Object Oriented Programming with c++ Exam Questions - Set 27 - ObjectiveBooks

Object Oriented Programming with c++ Exam Questions - Set 27

Practice Test: Question Set - 27

1. When you pass a variable _______, C++ passes only the contents of the variable to the receiving function
    (A) By reference
    (B) By value
    (C) Globally
    (D) Locally

2. Modules in C++ programs are
    (A) Functions
    (B) Procedures
    (C) Subroutines
    (D) Mini-programs

3. The generic name used for unexpected errors that occur during the execution of a program is
    (A) Infractions
    (B) Exceptions
    (C) Deviations
    (D) Anomalies

4. Redirection redirects
    (A) A stream from a file to the screen
    (B) A file from a device to a stream
    (C) A device from the screen to a file
    (D) The screen from a device to a stream

5. When the function void someFunction(int x) throw(char) is executed, _______
    (A) It will throw nothing
    (B) It may throw an integer
    (C) It may throw a character
    (D) It may not throw anything

6. A data member holds a 1 or 0 depending on whether taxes have been paid. The best identifier for this member is _______
    (A) taxes
    (B) paidTaxes
    (C) taxesArePaid
    (D) code

7. A base class may also be called a
    (A) Child class
    (B) Subclass
    (C) Derived class
    (D) Parent class

8. In C++, a function contained within a class is called
    (A) A member function
    (B) An operator
    (C) A class function
    (D) A method

9. An object is a(n) _______ of a class
    (A) Owner
    (B) Function
    (C) Definition
    (D) Instance

10. Evaluate the following expression: 3 >6&&7>4
    (A) True
    (B) False

11. When a program calls a function that has default parameters, if you omit an argument, you must ________
    (A) Not omit any other arguments
    (B) Omit all arguments
    (C) Omit all arguments to the right of that argument
    (D) Omit all arguments to the left of that argument

12. The arguments that determine the state of the cout object are called
    (A) Classes
    (B) Manipulators
    (C) Format flags or state flags
    (D) State controllers

13. A function that returns no values to the program that calls it is _______
    (A) Not allowed in C++
    (B) Type void
    (C) Type empty
    (D) Type barren

14. A function that changes an object's state belongs to the category of
    (A) Inspector functions
    (B) Mutator functions
    (C) Auxiliary functions
    (D) Manager functions

15. Student senior(); is a(n)_________
    (A) Constructor call with no arguments
    (B) Object instantiation
    (C) Constructor call with all default arguments
    (D) Prototype for a function that returns a student object

Show and hide multiple DIV using JavaScript View All Answers

 Next Tests:

    Blogger Comment
    Facebook Comment