Previous: 11.4 Common Errors
Up: 11 String Processing
Next: 11.6 Exercises
Previous Page: 11.4 Common Errors
Next Page: 11.6 Exercises

11.5 Summary

This chapter has discussed a very common data type in C programs: the string. We have briefly introduced the concept of an abstract data type as consisting of a data declaration and a set of operations on data items of that type. We have defined a user defined type, STRING, for string data and used it throughout the chapter. (While our string data type does not completely satisfy the definition of an abstract data type, the basic concept is seen).

Many common operations on string data are provided through the standard library. We have described a few of these; in particular functions for I/O: gets() and puts(), and file I/O: fgets() and fputs() whose prototypes are defined in stdio.h. In addition the functions for string manipulation, strlen() and strcpy() as well as string operation, strcmp() and strcat(), have been described. Other functions described include atoi(), strncmp(), and strncpy().

Throughout the chapter we have shown numerous examples of programs for string processing.

tep@wiliki.eng.hawaii.edu
Sat Sep 3 07:04:57 HST 1994