Namespaces

Review Questions

   
1.

What is a scope? What kinds of "things" have a scope?

2.

What is a storage class? What kinds of "things" have a storage class?

3.

When are static objects initialized? Be sure to mention both globals and block-scope objects.

4.

How does const act as a scope modifier?

5.

What does extern mean?

6.

The keyword static has many meanings depending upon where it is used.

  1. Explain how static can be used as a scope modifier.
  2. Explain how static can be used as a storage-class modifier.
  3. Give another use for the keyword static.

Категории