C programming: multi-line character arrays
Self-tutoring about C programming: the tutor mentions a resource.
I needed to create a very long string, many lines, in a C program. I didn’t know how.
Apparently it can be done thus:
char theString[]=”One line.”
“Two lines.\n”
“Three lines.\n”
“Four.\n”;
Source:
Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.
Leave a Reply
You must be logged in to post a comment.