CS311 C++

Review for First Quiz

  1. What is a console application?

  2. What do we expect to see as the extension for a file that is:
    1. a C++ source code file
    2. a header file
    3. an executable file


  3. Where does data flow when redirected into cout?

  4. Functions must be prototyped, may be called and must be defined. Write an example of each of these for a function called fSquare that will receive an integer argument and return that integer squared.

  5. How do you make a remark in C? How about in C++?

  6. What is the name of that usual header file in C? In C++?

  7. Write a line of code that declares:
    1. an integer
    2. a pointer to integer
    3. a character array, size 10
    4. a structure that holds one integer, one float


  8. What is the basic difference between a class and a structure?

  9. What does it mean to overload a function?

  10. Operators are typically overloaded in C. Name two common operators and write code examples showing that they are used as overloaded operators.

  11. If you are going to assign default variables to a function, where in the code do you specify this?

  12. What are the two major sections in a class definition?

  13. Declare a class called CExample, and place correct declarations in it for the mandatory sections and functions.

  14. What are the two major project steps your book divides a project into?

  15. Visual C++ allows us to create a number of different kinds of projects. What choice on the first design screen tells it we are going to make a Windows application?

  16. There are three types of Windows applications that Visual C++ offers to us. Which one are you directed to choose in Chapters 1 and 2?

  17. On the Visual C++ Build menu, what is the difference between the the Build and Rebuild All choices?

  18. If you wish to access the object in a project, which tab do you select at the bottom of the Project Workspace window?

  19. What is the keypress that cancels the full screen display of a screen object?

  20. Objects in a project have properties. What is the procedure to access the properties of an object quickly with the mouse?

  21. What is an event in a Windows application? Give an example of a common event for a common object.

  22. What function call will automatically close a dialog box?

  23. What buttons appear by default when creating a Message Box?

  24. What buttons appear by default when creating a Dialog Box?

  25. When carrying out the first phase of a project, you must obtain project requirements, to determine what to do. What is a term used for the first draft screen design in this phase?

  26. What does the ID property of a button determine?

  27. What does the Caption property of a button determine?

  28. How do you enable a hotkey for a button?

  29. What is an edit box for?

  30. What are the two events that are associated with a button in Visual C++ by default?

  31. If you wish to assign code to a button event, what is the correct menu choice from the main Project Workspace screen to begin this?