STRCPY()
char *strcpy(char *destination, char *source);
char string[50];
char *ptr = "Computer";
strcpy(string, ptr);
* ALT: strcpy(string, "Alice has a cat");
* makes a copy of a string pointed to by source and stores it at the location
pointed to by destination.
- copying involves all the characters of the string source, including the null
character at the end
* this function makes a copy of a string pointed to by source and stores it at the
location pointed to by destination. The string pointed to by source is not modified
in any way.
- copying involves all the characters of the string source, including the null
character at the end. the result of the function is the same pointer as the one
specified as destination.
Last updated