What is the type of access specifier that the data member number fall under?
//a simple class
class test_example{
int number;
};
Classes
Quiz
•
Computers
•
University
•
Hard
Yomna Elkholy
Used 9+ times
FREE Resource
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the type of access specifier that the data member number fall under?
//a simple class
class test_example{
int number;
};
Private
Public
Protected
Default
2.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Where can a protected data member be accessed?
Within the same class
Outside of the class
Within the derived class
Both within and outside the class
3.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
The concept of handling complexity by hiding the details of a class from theuser is known as:
Inheritance
Polymorphism
Abstraction
Encapsulation
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How is the template of a class different from a normal class?
Class template generates objects of classes based on the template type.
Compiler generates classes for only the used types.
Class template helps in making generic classes.
All of the above
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following means "The use of an object of one class in definition of another class", providing a Has-A relationship?
Encapsulation
Composition
Inheritance
Abstraction
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does inheritance allow in a program?
Class reusability
Creating a hierarchy of classes
Extendibility
All of the above
7.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What will be the output of the following C++ code?
Created
Destroyed
Destroyed
Created
Compile-time error
Run-time error
8.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What is the output of the following program?
Base
Derived
Compilation error
None of the above
9.
MULTIPLE CHOICE QUESTION
1 min • 3 pts
What will be the output of the following C++ code?
20
10
20
10
30
10 questions
JAVA FOR ANDROID-JAVA
Quiz
•
University
9 questions
Inheritance + java
Quiz
•
University
10 questions
INTRODUCTION TO OOPS
Quiz
•
University
8 questions
PRG521 Chap8
Quiz
•
University
10 questions
Unit 24 - Java Basics
Quiz
•
University
10 questions
ISPFL1 Midterm Quiz #3
Quiz
•
University
10 questions
Java Arrays
Quiz
•
University
8 questions
Hibernate Java
Quiz
•
University
15 questions
Multiplication Facts
Quiz
•
4th Grade
20 questions
Math Review - Grade 6
Quiz
•
6th Grade
20 questions
math review
Quiz
•
4th Grade
5 questions
capitalization in sentences
Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance
Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions
Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines
Quiz
•
Professional Development
12 questions
Dividing Fractions
Quiz
•
6th Grade