C++ OOPs Concepts & Inheritance Quiz

C++ OOPs Concepts & Inheritance Quiz

University

20 Qs

quiz-placeholder

Similar activities

Quiz Round For Group 1

Quiz Round For Group 1

University

20 Qs

Understanding Schematic and Logic Diagrams

Understanding Schematic and Logic Diagrams

University

20 Qs

Bioenergy

Bioenergy

University

15 Qs

Engineering Design Experience Quiz

Engineering Design Experience Quiz

8th Grade - University

15 Qs

Examen Unidad 2 Circuitos Eléctricos UTA

Examen Unidad 2 Circuitos Eléctricos UTA

University

19 Qs

Quiz Counter, FSM 2024

Quiz Counter, FSM 2024

University

15 Qs

unit1 MCQ

unit1 MCQ

University

15 Qs

Quiz 1

Quiz 1

University

19 Qs

C++ OOPs Concepts & Inheritance Quiz

C++ OOPs Concepts & Inheritance Quiz

Assessment

Quiz

Engineering

University

Hard

Created by

Shrutika Nakadi

Used 6+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is not a feature of OOP in C++?

Encapsulation

Abstraction

Inheritance

Compilation

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the default access specifier for members of a class in C++?

Public

Private

Protected

Internal

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What type of inheritance is shown in the following code? class A { }; class B : public A { }; class C : public B { };

Single inheritance

Multiple inheritance

Multilevel inheritance

Hybrid inheritance

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What is the output of this code? class Base { public: void show() { cout << "Base class"; } }; class Derived : public Base { public: void show() { cout << "Derived class"; } }; int main() { Derived d; d.show(); return 0; }

Base class

Derived class

Error

Nothing

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which keyword is used to inherit a class in C++?

inherit

extends

using

:

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is not a C++ token?

Identifier

Keyword

Punctuation

Class

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What is the output of this code snippet? class A { public: int x = 10; }; class B : public A { public: void display() { cout << x; } }; int main() { B obj; obj.display(); return 0; }

Error

10

0

Garbage value

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?