Advanced Programming Concepts MCQ Test - Set 02 - ObjectiveBooks

Advanced Programming Concepts MCQ Test - Set 02

Practice Test: Question Set - 02


1. _______ refers to the process of locating and removing the errors in a program
    (A) Analyzing
    (B) Correcting
    (C) Debugging
    (D) Executing

2. A pointer is
    (A) The address of a variable
    (B) An indication of the variable to be accessed next
    (C) A variable for storing addresses
    (D) The data type of an address variable

3. The name of a function ends with
    (A) Double quotes
    (B) Single quotes
    (C) Parenthesis
    (D) #

4. Which of the following will store the letter H in a Character variable named initial?
    (A) initial = 'H'
    (B) initial = 'H';
    (C) initial = "H"
    (D) initial = "H";

5. In the statement template<class T>,
    (A) T is a class
    (B) T is a scalar variable
    (C) Either (a) or (b)
    (D) Neither (a) nor (b)

6. The feature that allows the same operations to be carried out differently depending on the object is ________
    (A) Polymorphism
    (B) Polygamy
    (C) Inheritane
    (D) Multitasking

7. To write data that contains variables of type float, to an object of type of stream, you should use
    (A) The insertion operator
    (B) seekg()
    (C) writeQ
    (D) put()

8. If you declare two objects as Customer firstCust, secondCust; which of the following must be true?
    (A) Each object will store a separate copy of any static member data
    (B) Each object will store a separate copy of any member functions
    (C) Each object will store a separate copy of any nonstatic data members
    (D) You cannot declare two objects of the same class

9. Inheritance is the principle that
    (A) Classes with the same name must be derived from one another
    (B) Knowledge of a general category can be applied to more specific objects
    (C) C++ functions may be used only if they have logical predecessors
    (D) One function name may invoke different methods

10. Programmer-defined functions can be
    (A) Value-returning functions only
    (B) Void functions only
    (C) Either value-returning or void functions
    (D) None of these

11. A function that is called automatically each time an object is created is a(n)
    (A) Constructor
    (B) Contractor
    (C) Builder
    (D) Architect

12. If you assign a default value to any variable in a function prototype's parameter list, then _______
    (A) All other parameters in the function prototype must have default values
    (B) All parameters to the right of that variable must have default values
    (C) All parameters to the left of that variable must have default values
    (D) No other parameters in that prototype can have default values

13. A function that is called automatically each time an object is destroyed is a
    (A) Constructor
    (B) Destructor
    (C) Destroyer
    (D) Terminator

14. The most efficient data type for a variable that stores the letter C is the _______ data type
    (A) Character
    (B) Double
    (C) Float
    (D) Long Integer

15. If you want to use a class to define objects in many different programs, you should define the class in a C++ _______ file
    (A) Header
    (B) Program
    (C) Source
    (D) Text

Show and hide multiple DIV using JavaScript View All Answers

 Next Tests: