Classes and Inheritance MCQs in C++ OOP

Classes and Inheritance MCQs in C++ OOP

1: How many ways to use existing classes to define a new class? Select the correct option.
A. 4
B. 1
C. 2
D. 3
E. All of these
F. Both A and B

Answer - Click Here:
C

2: Composition is called a ___________.
A. Aggregation
B. Containment
C. Provision
D. Both A and D
E. All of these
F. Both A and C

Answer - Click Here:
F

3: When a data member of the new class is an object of another class is called ___________.
A. A new class is an aggregate of another
B. A new class is a composite of other objects
C. A new class is inherited
D. None of them
E. All of these
F. Both A and B

Answer - Click Here:
B

4: We can define a new class from an existing class, which of the following is used.
A. Composition
B. Inheritance
C. Constructors
D. Both A and D
E. All of these
F. Both A and B

Answer - Click Here:
F

5: Classes refers is to use of one or more classes within the definition of another class, is also called ___________.
A. Provision
B. Inheritance
C. Composition
D. None of them
E. All of these
F. Both A and B

Answer - Click Here:
C

6: Using keywords as an identifier causes is called ________.
A. Syntax error
B. Logical error
C. Run time error
D. None of them
E. All of these
F. Both A and B
Answer - Click Here:
A

7: Rectangle symbol in flowchart is called _________.select correct option
A. Connector symbol
B. Action symbol
C. Terminating symbol
D. Begin symbol
E. All of these
F. Both A and B

Answer - Click Here:
B

8: All keywords bool, catch, private, public, this and throw,are introduce in ____________.
A. C++ Language
B. C language
C. Both C and C++
D. None of them
E.All of these
F. Both A and B

Answer - Click Here:
A

9: First object-oriented language ‘Smalltalk’ were first appeared in_________ year.
A. 1982
B. 1992
C. 1972
D. 2000
E. All of these
F. Both A and B
Answer - Click Here:
C

10: Member function will access data and return value to the user when it is. Which option is correct.
A. deleted
B. called
C. declared
D. initialized
E. All of these
F. Both A and B

Answer - Click Here:
B

11: Select the correct option according to a given statement. Data in an object-oriented language is safe from accidental alternation as it is.
A. error-free
B. bugged
C. compressed
D. hidden
E. All of these
F. Both A and B

Answer - Click Here:
D

12: If we want to read a data item in an object, member function in an object is. select the correct option.
A. delete
B. call
C. declare
D. initialize
E.  All of these
F. Both A and B
Answer - Click Here:
B

13: Data encapsulation and data hiding are key features of. select the correct option.

A. object-oriented language
B. procedural language
C. machine language
D. structural language
E. All of these
F. Both A and B

Answer - Click Here:
A

Computer Science Repeated MCQs Book Download

Prof. Fazal Rehman Shamil
Latest posts by Prof. Fazal Rehman Shamil (see all)

    Buy advertisement space on T4Tutorials

    For more details email [email protected]