strcat (string concatenation) function cara kivabe duti string add kora jabe.

#include <stdio.h> int main() { char s1[100], s2[100], i, j; printf("Enter first string: "); scanf("%s", s1); printf("Enter second string: "); scanf("%s", s2); for(i = 0; s1[i] != '\0'; ++i); //এই লাইন এ প্রথম স্ট্রিং এর সর্বশেষ ইন্ডেক্স টি বের করা হচ্ছে। for(j = 0; s2[j] != '\0'; ++j, ++i) { s1[i] = s2[j]; } s1[i] = '\0'; // প্রথম স্ট্রিং এর সর্বশেষ ইন্ডেক্স এ নাল ক্যারেকটার বসাইছি। printf("New string : %s", s1); return 0; }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.