I've just started to learn C programming. When coming to the String, I get confused with the function 'strcpy'. I tried switching places of first argument and the second argument. When I run the program, it just shows a 'S'. What does that mean?
char s2[ ]= "Hello";
char s1[10];
strcpy(s2, s1);
printf("Source string = %s\n", s2);
printf("Target string = %s\n", s1);
I thought the output would be null. But it just shows a 'S'.