/* Coping a string. */
#include <stdio.h>
int main()
{
char a[20], b[20];
int i;
printf("Enter a string: ");
gets(a);
printf("Coping string A into string B.....\n");
for(i = 0; a[i] != '\0'; i++ )
b[i] = a[i];
b[i] = '\0';
printf("String A is...\n");
puts(a);
printf("String B is...\n");
puts(b);
return 0;
}
Comments
Post a Comment