Copy String Without Using strcpy()
Gapfill exercise
Solution
#include <stdio.h>
int main()
{
char s1[100], s2[100], i;
printf("Enter string s1: ");
fgets(s1, sizeof(s1), stdin);
[?]
{
s2[i] = s1[i];
}
s2[i] =
[?]
;
printf("String s2: %s", s2);
return 0;
}
Solution
OK