C++ PROGRAM STRUCTURE

KEY TERMS

Identifiers

Reserved words

Data type

Declaration

  • statement that places an identifier with a data object, function, or data type

    Variable

    Assignment statement

    Assignment [due at beginning of class tomorrow]

    Answer the following review questions, based on your reading of Chapter 2.
    1. List two rules for using identifiers
    2. List three reserved words introduced in Chapter 2
    3. Write an example of a value for the following data types:
      char, int, floating point
    4. What is the difference between a constant and a variable?
    5. All your C++programs will use the variable cout. Why?