C++ Programming Free Online Test - Set 06 - ObjectiveBooks

C++ Programming Free Online Test - Set 06

Practice Test: Question Set - 06


1. Vtables
    (A) Creates a static table per class
    (B) Creates a static table per object
    (C) Creates a dynamic table per class
    (D) Creates a dynamic table per object

2. When class B is inherited from class A, what is the order in which the constructers of those classes are called?
    (A) Class A first Class B next
    (B) Class B first Class A next
    (C) Class B’s only as it is the child class
    (D) Class A’s only as it is the parent class

3. In a group of nested loops, which loop is executed the most number of times?
    (A) The outermost loop
    (B) The innermost loop
    (C) All loops are executed the same number of times
    (D) Cannot be determined without knowing the size of the loops

4. What is the Difference between struct and class in terms of Access Modifier?
    (A) By default all the struct members are private while by default class members are public
    (B) By default all the struct members are protected while by default class members are private
    (C) By default all the struct members are public while by default class members are private
    (D) By default all the struct members are public while by default class members are protected

5. Inline functions are invoked at the time of
    (A) Run time
    (B) Compile time
    (C) Depends on how it is invoked
    (D) Both b and c above

6. What’s wrong? (x = 4 && y = 5) ? (a = 5) ; (b = 6);
    (A) The question mark should be an equal sign
    (B) The first semicolon should be a colon
    (C) There are too many variables in the statement
    (D) The conditional operator is only used with apstrings

7. Which of the following language feature is not an access specifier in C++?
    (A) Public
    (B) Private
    (C) C protected
    (D) Internal

8. What is shallow copy?
    (A) A shallow copy creates a copy of the dynamically allocated objects too
    (B) A shallow copy just copies the values of the data as they are
    (C) A shallow copy creates a copy of the statically allocated objects too
    (D) Both b and c above

9. In C language, a hexadecimal number is represented by writing
    (A) x
    (B) xo
    (C) ox
    (D) h

10. Which of the following below is /are a valid iterator type?
    (A) Input Iterator
    (B) Backward Iterator
    (C) Forward Iterator
    (D) Both (a) and (c) above

Show and hide multiple DIV using JavaScript View All Answers

 Next Tests: