CODE ::
#include <stdio.h>
#include <string.h>
int main ()
{
int i,j,k;
char a[100],b[100],c[100];
printf("Enter a string: ");
gets(a);
printf("Enter another string: ");
gets(b);
for(i=0;i<a[i];i++)
{
c[i]=a[i];
}
c[i++]=' ';
for(j=i,k=0;k<b[k];k++,j++)
{
c[j]=b[k];
}
c[j]='\0';
puts(c);
return 0;
}
what's the purpose of this code...very confusing...Just input one string man not two..: (
ReplyDeleteas a professional programmer you have to do all thing as user defined, and this code is now right :)
Deletewhere is c[?] ?????.Make this code correct.. :(
ReplyDelete