Example #7

Standard Library String Handling Functions

In this example, I will create a program that demonstrates how some of the common standard library string functions work. This program will help explain how the functions work in two ways. First you will see the functions being used in the program. Second, the program itself is a demonstration program that illustrates to the user what, exactly, happens when the library string functions are used. You will definitely want to compile this program and try it out—even if you don't bother to look at the source code at all!

This program needs to be able to place text all over the screen in order to paint a clear and effective display. As a result, it uses the curses library. Consequently it can only be compiled on a system that supports curses, such as Unix. Keep in mind, however, that the string functions its demonstrating are part of the standard library.

The final program is attached as string_test.c.

© Copyright 2003 by Peter C. Chapin.
Last Revised: June 18, 2003