Chapter 12 Reading Assignment

Chapter 12 is easy. It focuses on the details of using character data in your programs. You can scan sections 12.6, 12.7 and 12.9... they show applications using the fancy string functions defined in Chapter 12. BTW, if you're still a little foggy on operator overloading, then section 12.9 provides some nice examples.


Section 12.1 - C-strings

What is the null terminator (or '\0')? How is it used in C-strings?

What is the difference between '\0' and '0'?

Section 12.2 - C-string functions

What do each of the following C-string functions do:

Section 12.3 - String/numeric conversion

What do these do:

Section 12.4 - Character testing

And these:

Section 12.5 - Character case conversion

And these (sigh):

Section 12.8 - The C++ string class

What is the big difference in how C-strings and C++ strings are defined/represented?

List an advantage of C-strings... list one advantage of C++ strings.

For each of the following, write a code fragment using both C-strings and the C++ string class: