Operations on strings
|
||||||||||||||||
int len = strlen (s); |
// will yield 16 |
|||||||||||||||
but if we want to copy this string into an array then we would need a declaration like: |
||||||||||||||||
char letters [1+strlen(s)]; |
// Why 1+? |
|||||||||||||||
char* strcpy ( char* StrNew, const char* StrOrig);
|
||||||||||||||||
4 February, 1998 |
5 |
Copyright University of Alberta |