Object Oriented Programming in c++ Questions and Answers pdf - Set 24 - ObjectiveBooks

Object Oriented Programming in c++ Questions and Answers pdf - Set 24

Practice Test: Question Set - 24


1. Which of the following statements is false?
    (A) A function is a block of code that performs a specific task
    (B) Functions allow programmers to break large and complex problems into small and manageable tasks
    (C) Functions allow programmers to use existing code to perform common tasks
    (D) Functions can be called, or invoked, only once in a program

2. The extraction operator >> is a(n) ________
    (A) Overloaded function
    (B) C++ class
    (C) C++ object
    (D) Static reference variables

3. The following statement where T is true and F is false T&&T||F&&T
    (A) Is true
    (B) Is false
    (C) Is wrong
    (D) Not applicable in C language

4. Which of the following statements allows the user to enter data at the keyboard?
    (A) cin << currentPay;
    (B) cin >> currentPay;
    (C) cout << currentPay;
    (D) cout >> currentPay;

5. Which functions do not have a ‘this’ pointer?
    (A) Access functions
    (B) Inspector functions
    (C) Member functions
    (D) Static functions

6. A C++ statement must end in a
    (A) : (column)
    (B) , (comma)
    (C) . (period)
    (D) ; (semicolon)

7. Paying attention to the important properties while ignoring inessential details is known as________
    (A) Selectiveness
    (B) Polymorphism
    (C) Abstraction
    (D) Summarizing

8. If you want only one memory location to be reserved for a class variable, no matter how many objects are instantiated, you should declare the variable as________
    (A) Dynamic
    (B) Unary
    (C) Static
    (D) Volatile

9. The pow and sqrt functions return a(n) _______ type number
    (A) Double
    (B) Float
    (C) Integer
    (D) Long

10. Overloaded functions are required to
    (A) Have the same return type
    (B) Have the same number of parameters
    (C) Perform the same basic functions
    (D) None of the above

11. The weakest form of cohesion is
    (A) Coincidental
    (B) Functional
    (C) Logical
    (D) Communicational

12. Which of the following are void functions?
    (A) main
    (B) pow
    (C) sqrt
    (D) All of the above

13. To use either an input or output file, the program must include the _______ header file
    (A) filestream.h
    (B) fstream.h
    (C) instream.h
    (D) inoutstream.h

14. Which of the following pairs of identifier name(s) are(is) considered to be identical?
    (A) name, names
    (B) smith, johnsmith
    (C) identifier 1, identifier_2
    (D) charl, char_l

15. Adding a derived class to a base class requires fundamental changes to the base class
    (A) True
    (B) False

Show and hide multiple DIV using JavaScript View All Answers

 Next Tests: