Back To C Single Dimensional Arrays Index
//program to input two strings(char array) and concatenate them using for loop (concatenate means to join the strings) #include
#include
#include
void main() { char str1[20],str2[20],str3[40]; int i,j,l,k; clrscr(); printf("\nenter string 1"); gets(str1); printf("\nenter string 2"); gets(str2); l=strlen(str1); k=strlen(str2); for(i=0;i