C++ Classes Quiz Questions and Answers - 1

Question: 1

The members of a class are accessed using ___

(A) New operator

(B) Dot operator

(C) + operator

(D) Size of operator

Ans: B

Dot operator

Question: 2

The body of a class is terminated by a _____

(A) .

(B) ;

(C) :

(D) #

Ans: B

;

Question: 3

By default class members are treated as ____

(A) Public

(B) Private

(C) Protected

(D) Unprotected

Ans: D

Unprotected

Question: 4

The binding of data and functions together into a single entity is known as ____

(A) Inheritance

(B) Encapsulation

(C) Overloading

(D) Polymorphism

Ans: B

Encapsulation

Question: 5

Which of the following is a way to bind the data and its associated functions together?

(A) Methods

(B) Class

(C) Data

(D) Functions

Ans: B

Class

Related Questions
Recent Articles
Trending Posts

REGISTER TO GET FREE UPDATES