Object Oriented Programming in c++ Examples - Set 28 - ObjectiveBooks

Object Oriented Programming in c++ Examples - Set 28

Practice Test: Question Set - 28


1. The type to be used in an instantiation of a class template follows ________
    (A) The generic class name
    (B) The keyword template
    (C) The keyword class
    (D) The template definition

2. When variables refer to attributes of an entity (such as name, address, and phone number of a person), those attributes form a _______
    (A) File
    (B) Record
    (C) Field
    (D) Program

3. You add the desired type to a specific template class instantiation by placing the type's name ________
    (A) Between angle brackets
    (B) In parentheses
    (C) On a line by itself
    (D) Immediately prior to the class name

4. You mark the beginning of a function's block of code with the ________
    (A) /
    (B) *
    (C) {
    (D) }

5. Variables that hold memory addresses are called ________
    (A) Subscripts
    (B) Holders
    (C) Pointers
    (D) Indicators

6. A pattern for creating an object is called a(n) _______
    (A) Class
    (B) Attributes
    (C) Private
    (D) Public

7. The use of the break statement in a switch statement is
    (A) Optional
    (B) Compulsory
    (C) Not allowed. It gives an error message
    (D) To check an error

8. A derived class ________ override attributes of a parent class
    (A) May
    (B) May if the two classes have the same name
    (C) Must
    (D) Must not

9. Which of the following will store the number 320000 as a Float number?
    (A) counPop = (float) 3.2e5;
    (B) counPop = (float) 3.2e6;
    (C) counPop = (float) .32e5;
    (D) counPop = (float) .32e7;

10. Header files often have the file extension _______.
    (A) .H
    (B) .H
    (C) .HEA
    (D) .HEAD

11. The measure of how well the operations in a function relate to one another is ________
    (A) Coupling
    (B) Cohesion
    (C) Adhesion
    (D) Conversion

12. A program will have one function prototype for each function defined in the programmer-defined section of the program. (Assume that the programmer-defined section is located below the main function.)
    (A) True
    (B) False

13. An array name is a ________
    (A) Subscript
    (B) Formal parameter
    (C) Memory address
    (D) Prototype

14. The letter V is a _______
    (A) Character literal constant
    (B) Numeric literal constant
    (C) String literal constant
    (D) Variable

15. Reference variables and const class members ________
    (A) Must be assigned values in any derived class
    (B) Must never be initialized in a base class
    (C) Must be initialized, rather than assigned values
    (D) Must not exist if a class is to be a base class

Show and hide multiple DIV using JavaScript View All Answers

 Next Tests:

    Blogger Comment
    Facebook Comment