ExamVeda
Login
Home
1
Which keyword is used to define a class in C++?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
2
What is the process of creating an instance of a class called in C++?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
3
What is inheritance in C++?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
4
What is the access specifier that allows members to be accessed from outside the class in C++?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
5
Which concept in C++ allows a class to have multiple functions with the same name but different parameter lists?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
6
What is encapsulation in C++?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
7
Which keyword is used to inherit a class in C++?
Discuss
Answer & Solution
Answer: Option A
Solution:
In C++, the keyword public is used to specify public inheritance when inheriting a class.

When a class inherits another class publicly, all public members of the base class become public members of the derived class, and protected members of the base class become protected members of the derived class.

The keywords private and protected can also be used for inheritance, but they specify different levels of access control:

private inheritance: All public and protected members of the base class become private members of the derived class.

protected inheritance: All public and protected members of the base class become protected members of the derived class.

The keyword extends is used in languages like Java for inheritance, but not in C++.

Therefore, the correct answer is public.
8
What is polymorphism in C++?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
9
Which of the following is true about constructors in C++?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
10
What is the process of wrapping data and functions into a single unit called in C++?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board