C++ OOPs Concepts & Inheritance Quiz

Quiz
•
Engineering
•
University
•
Hard
Shrutika Nakadi
Used 6+ times
FREE Resource
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
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
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
Similar Resources on Wayground
17 questions
Real-Time Scheduling Quiz

Quiz
•
University
16 questions
ARM Cortex-M4 Microcontroller Quiz

Quiz
•
University
20 questions
Mattel QSOP tháng 12

Quiz
•
University
20 questions
National Youth Day Celebration Focusing on SDG 4 & 8

Quiz
•
University
25 questions
Round1

Quiz
•
University
15 questions
ETS Pemrograman Berorientasi Obyek

Quiz
•
University
20 questions
Software Reuse Quiz

Quiz
•
University
18 questions
Vex Block Programming

Quiz
•
8th Grade - University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Engineering
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University