Strings
|
#include <strings.h> ...strcpy(buffer, message); |
A string is an array of characters (bytes), terminated by a byte
with value
....0 ('\0'). Alternatively, a string is a
pointer to the first character of
....the array.
The string "This is a message" occupies 18 bytes --- 17 visible
characters
....plus one byte
that terminates the string.
There is a library of functions that manipulate strings. Be sure
to #include
....<strings.h>
before using it.