Self Test Questions

 < Day Day Up > 



  1. Describe in your own words the definition of a function.

  2. List and describe the three characteristics of a good function.

  3. What is the difference between a function’s interface and its implementation? What constitutes a function’s interface? What constitutes a function’s implementation? Why is it important or desirable to separate a function’s interface from its implementation?

  4. What is the purpose of the #ifndef, #define, & #endif preprocessor directives as they apply to header files?

  5. List at least three benefits to giving functions good names.

  6. In what two ways can arguments be passed to functions? What is the difference between the two ways? What advantages or disadvantages are associated with each way?

  7. What is the difference between an automatic local variable and a static local variable?

  8. What is meant by the phrase, "Maximize Cohesion — Minimize Coupling"?

  9. Describe how functions can be overloaded.

  10. Given the following function pointers describe what type of function each can point to:

    (void)(*fun_ptr)(); (float)(*fun_ptr)(int, char*, float); (char*)(*fun_ptr)(float, float);



 < Day Day Up > 



C++ for Artists. The Art, Philosophy, and Science of Object-Oriented Programming
C++ For Artists: The Art, Philosophy, And Science Of Object-Oriented Programming
ISBN: 1932504028
EAN: 2147483647
Year: 2003
Pages: 340
Authors: Rick Miller

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net