The string copy goes character-by-character, filling up the variable array with what is in the string. For instance:
char temp[10];
strcpy(temp,"test");
what happens here:
put 't' in temp[0];
put 'e' in temp[1];
put 's' in temp[2];
put 't' in temp[3];
put '\0' in temp[4];
the '\0' is the NULL character, which indicates the end of the string.
- John
The string copy goes character-by-character, filling up the variable array with what is in the string. For instance:
char temp[10];
strcpy(temp,"test");
what happens here:
put 't' in temp[0];
put 'e' in temp[1];
put 's' in temp[2];
put 't' in temp[3];
put '\0' in temp[4];
the '\0' is the NULL character, which indicates the end of the string.
- John