Object Oriented Programming using c++ Multiple Choice Questions & Answers - Set 32 - ObjectiveBooks

Object Oriented Programming using c++ Multiple Choice Questions & Answers - Set 32

Practice Test: Question Set - 32


1. A difference, between reference variables and pointers is that
    (A) Reference variables are easier to use
    (B) Pointers are easier to use
    (C) Reference variables are more flexible
    (D) No difference exists between reference variables and pointers

2. Within a program, you can instantiate ________that have a class template type
    (A) Classes
    (B) Functions
    (C) Parameters
    (D) Objects

3. A function stub typically contains
    (A) The function header
    (B) The function braces
    (C) The return statement, if it's value-returning function
    (D) All of the above

4. The #include instruction is called a
    (A) Direction
    (B) Directive
    (C) Merge instruction
    (D) Statement

5. If you omit any constructor argument when you instantiate an object, you must use default values
    (A) For all parameters to the constructor
    (B) For all parameters to the right of the argument
    (C) For all parameters to the left of the argument
    (D) For no other parameters

6. The function that takes arguments to set the bits of cout is _______
    (A) setf()
    (B) bitset()
    (C) ios()
    (D) flat()

7. If no exception is thrown ________
    (A) A catch block will cause an error
    (B) The first catch block coded will execute
    (C) The last catch block coded with execute
    (D) Any catch blocks coded with be bypassed

8. Which of the following is true?
    (A) Iostream is derived from istream
    (B) Iostream is derived from ostream
    (C) Ostream is derived from iostream
    (D) Ostream is derived from istream

9. Which of the following is the fourth problem-solving step?
    (A) Analyze the problem
    (B) Evaluate and modify (if necessary) the program
    (C) Code the algorithm
    (D) Plan the algorithm

10. The get() function returns ________
    (A) A character
    (B) Void
    (C) A reference to the object that invoked it
    (D) A copy of the object that invoked it

11. The store of memory available to programs is the ________
    (A) Store
    (B) Stack
    (C) Pile
    (D) Heap

12. Static variables are sometimes called
    (A) Class variables
    (B) Functional variables
    (C) Dynamic variables
    (D) Auto variables

13. A variable is _______
    (A) An item of data
    (B) A memory location whose value can change while the program is running
    (C) A memory location whose value cannot change while the program is running
    (D) None of the above

14. To send output to a file, you need to include the _______ header file in your program
    (A) file.h
    (B) fstream.h
    (C) iomanip.h
    (D) iostream.h

15. The statement double val[15]={44.123456};
    (A) Assigns the value 44.123456 to all members of the array val
    (B) Assigns the value 44.123456 to val[0] and 0 to the rest of the members
    (C) Gives an error message
    (D) Assigns the value 44.12345 to val[1] and val[5]

Show and hide multiple DIV using JavaScript View All Answers

 Next Tests: