Object Oriented Programming with c++ Questions and Answers - Set 30 - ObjectiveBooks

Object Oriented Programming with c++ Questions and Answers - Set 30

Practice Test: Question Set - 30

1. The word case used in the switch statement represents a
    (A) Function in the C++ language
    (B) Data type in the C++ language
    (C) Keyword in the C++ language
    (D) Global variable in the C++ language

2. Having more than one function with the same name is called
    (A) Overloading
    (B) Defaulting
    (C) Casting
    (D) Referencing

3. A widget is to the blueprint for a widget as an object is to
    (A) A member function
    (B) A class
    (C) An operator
    (D) A data item

4. When a class serves as a base class to others, _______
    (A) All of its members are inherited
    (B) All of its members are inherited, except for any private members
    (C) All of its members are inherited, except for any protected members
    (D) None of its members is inherited unless specifically "listed

5. To be called object-oriented, a programming language must allow
    (A) Functions that return only a single value
    (B) #include files
    (C) Inheritance
    (D) All of the above

6. When a function performs tasks based on a decision, it has ________
    (A) Functional cohesion
    (B) Coincidental cohesion
    (C) Logical cohesion
    (D) No cohesion

7. You can use the C++ _______ function to assign a value to a String variable
    (A) Assign
    (B) Copy
    (C) String
    (D) Strcpy

8. The best form of coupling is _______
    (A) Complete
    (B) Tight
    (C) Loose
    (D) Free

9. Which of the following C++ expressions will find the square root of the number 16?
    (A) pow (16, 2) (b) root (16, 2)
    (B) sqroot (16)
    (C) sqrt (16, 2)
    (D) sqrt (16)

10. A group of related fields that contain all of the data about a specific person, place, or thing is called a
    (A) Data file
    (B) Field file
    (C) Program file
    (D) Record

11. The contents of two pointers that point to adjacent of type float differ by
    (A) One bytes
    (B) Two bytes
    (C) Three bytes
    (D) Four bytes

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

13. One of the relational operators in the C language is
    (A) !=
    (B) &&
    (C) !
    (D) #

14. Which of the following is false?
    (A) Data stored in an array can be accessed faster than data stored in a disk file
    (B) Data stored in an array needs to be entered only once, typically at the beginning of the program
    (C) Arrays allow the programmer to store information in the computer's internal memory
    (D) None of the preceding statements are false

15. The standard input stream, which refers to the keyboard, is called
    (A) cin
    (B) cout
    (C) stin
    (D) stout

Show and hide multiple DIV using JavaScript View All Answers

 Next Tests:

    Blogger Comment
    Facebook Comment