|
Arrays in C++
An Introduction |
|
Prof. David Bernstein
|
| Computer Science Department |
| bernstdh@jmu.edu |
NUL character (i.e., '\0')
strcpy() can't know the size of the array
so just copys whatever you tell it to, even if there isn't
enough memorystrncpy() which doesn't null-terminate if there
isn't spacestrncat() which does
int scores[30][5];
scores[0][3] = 100;
strcpy()
in the above example is strcpy(courses[1], "GISAT200");?