Object Oriented Programming c++ Questions & Answers - ObjectiveBooks

Object Oriented Programming c++ Questions & Answers

Practice Test: Question Set - 35

1. It is illegal to make objects of one class members of another class
    (A) True
    (B) False
    (C) Depends upon the kind of object
    (D) None of the above

2. The statement int num[2][3]={ {3,8,6}, {9,4,7}};
    (A) Assigns a value 4 to num[1][2]
    (B) Assigns a value 7 to num[1][2]
    (C) Assigns a value 8 to num[1][2]
    (D) Assigns a value 9 to num[1][2]

3. Which of the following backslash codes used for bell?
    (A) \b
    (B) a
    (C) \r
    (D) \s

4. When the compiler places a copy of a small function's statements directly into a program, the function is said to be _______
    (A) Overloaded
    (B) Mangled
    (C) Inline
    (D) Redundant

5. In C++, the address operator is the following symbol ________
    (A) >> 
    (B) &
    (C) *
    (D) !

6. Code that has already been tested is said to be _______
    (A) Inherited
    (B) Reusable
    (C) Reliable
    (D) Polymorphic

7. The two operators && an || are
    (A) Arithmetic operators
    (B) Equality operators
    (C) Logical operators
    (D) Relational operators

8. A blueprint for creating an object in C++ is called ________
    (A) A class
    (B) An instance
    (C) A map
    (D) A pattern

9. Storing a class definition in a separate file is an example of
    (A) Polymorphism
    (B) Name mangling
    (C) Implementation hiding
    (D) Inheritance

10. The most common operation used in constructors is ________
    (A) Addition
    (B) Overloading
    (C) Assignment
    (D) Polymorphism

11. The complement operator is represented by the symbol
    (A) ~
    (B) ^
    (C) i
    (D) <

12. A variable's _______ indicates which portions of the program can use the variable
    (A) Area
    (B) Extent
    (C) Lifetime
    (D) Scope

13. The variables declared in a statement block or listed in a function header's parameterlist are considered _______ variables
    (A) Area
    (B) Global
    (C) Local
    (D) Reference

14. You typically initialize Character variables to _______
    (A) A space enclosed in double quotes
    (B) A space enclosed in single quotes
    (C) The letter O
    (D) The number 0

15. The statement i*=3 is equivalent to
    (A) i = 3*
    (B) i = 3
    (C) i* = 3
    (D) i = i * 3

Show and hide multiple DIV using JavaScript View All Answers

 Next Tests:

    Blogger Comment
    Facebook Comment