CS 102
[Schedule]
[Examples] [Programs]
[Notes & Reference] [Syllabus]
[Lab & TA] [Tests]
[Grades]
We often need to manipulate stored text in C. This can be done using arrays of characters, which are called strings.
arrayStrings.c: using arrays to store strings, reading with %s, overwriting the '\0' at the end of a string. (See also a version tailored for the EECS machines)
encode.c: encoding some input text by a set transposition amount
See in-class notes
arrayptr1.c: An example using a pointer with an array
A description of some of the string functions.
stringFcns.c: A program using various string functions: strcat, strcmp, strcpy, strlen, strstr, strchr, strncpy
parse.c: A better way to repeatedly pull out words using strtok
See string.h in the C standard library functions.
[CS Dept] [UIC] [Prof. Reed]