Mar
30
//concat strings
#include<stdio.h>
void main(){
char st1[50],st2[50],st3[100];
int i,j;
printf(“Enter First string: “);
gets(st1);
printf(“Enter First string: “);
gets(st2);
for(i=0;st1[i]!=’\0′;i++){
st3[i]=st1[i];
}
j=i;
for(i=0;st2[i]!=’\0′;i++){
st3[j]=st2[i];
j++;
}
//puts(st3);
}
Leave a Reply
No Comments