C++ MCQ’s

C++ MCQ’s Home Page

C++ Basic 1
C++ Basic 2
C++ Basic 3
C++ Basic 4
C++ Basic 5
C++ OOPs Concepts 1
C++ OOPs Concepts 2
C++ OOPs Concepts 3
C++ OOPs Concepts 4
C++ OOPs Concepts 5

 

C++ Language MCQ’S | OOPs Concepts Set 1

1.
Wrapping data and its related functionality into a single entity is known as _____________

a) Abstraction
b) Encapsulation
c) Polymorphism
d) Modularity

2.
How structures and classes in C++ differ?

a) In Structures, members are public by default whereas, in Classes, they are private by default
b) In Structures, members are private by default whereas, in Classes, they are public by default
c) Structures by default hide every member whereas classes do not
d) Structures cannot have private members whereas classes can have

3.
What does polymorphism in OOPs mean?

a) Concept of allowing overiding of functions
b) Concept of hiding data
c) Concept of keeping things in differnt modules/files
d) Concept of wrapping things into a single unit

4.
Which concept allows you to reuse the written code?

a) Encapsulation
b) Abstraction
c) Inheritance
d) Polymorphism

5.
Which of the following explains Polymorphism?

a)
int func(int, int);
float func1(float, float);
b)
int func(int);
int func(int);
c)
int func(float);
float func(int, int, char);
d)
int func();
int new_func();

Visitor Counter

0051080