User`s manual

30 digi.com Language
4.7 Strings and Character Data
A string is a group of characters enclosed in double quotes ("").
"Press any key when ready..."
Strings in C have a terminating null byte appended by the compiler. Although C does not have a string data
type, it does have character arrays that serve the purpose. C does not have string operators, such as concat-
enate, but library functions strcat() and strncat() are available.
Strings are multibyte objects, and as such they are always referenced by their starting address, and usually
by a char* variable. More precisely, arrays are always passed by address. Passing a pointer to a string is
the same as passing the string. Refer to Section 4.15 for more information on pointers.
The following code illustrates a typical use of strings.
Note that both the pointer and the elements of the array are explicitly defined as const. Some versions of
Dynamic C allowed the second const to be omitted. Current versions of the compiler generate an error
unless the second const is included.
4.7.1 String Concatenation
Two or more string literals are concatenated when placed next to each other. For example:
"Rabbits" "like carrots."
becomes, during compilation:
"Rabbits like carrots."
If the strings are on multiple lines, the macro continuation character must be used. For example:
"Rabbits"\
"don’t like line dancing."
becomes, during compilation:
"Rabbits don’t like line dancing."
const char * const select = "Select option\n";
char start[32];
strcpy(start,"Press any key when ready...\n");
printf( select ); // pass pointer to string
...
printf( start ); // pass string