OOPS Set 2
Free Online Best OOPS MCQ Questions for improve your basic knowledge of C++. This OOPS Set 2 test that contains 25 Multiple Choice Questions with 4 options. You have to select the right answer to a question.
Start
Congratulations - you have completed OOPS Set 2.
You scored %%SCORE%% out of %%TOTAL%%.
Your performance has been rated as %%RATING%%
Your answers are highlighted below.
Question 1 |
Which was the first purely object oriented programming language developed?
A | Java |
B | C++ |
C | SmallTalk |
D | Kotlin |
Question 2 |
How many classes can be defined in a single program?
A | Only 1 |
B | Only 100 |
C | Only 999 |
D | As many as you want |
Question 3 |
Which feature allows open recursion, among the following?
A | Use of this pointer |
B | Use of pointers |
C | Use of pass by value |
D | Use of parameterized constructor |
Question 4 |
Which of the following is not type of class?
A | Abstract Class |
B | Final Class |
C | Start Class |
D | String Class |
Question 5 |
Which Feature of OOP illustrated the code reusability?
A | Polymorphism |
B | Abstraction |
C | Encapsulation |
D | Inheritance |
Question 6 |
Class is pass by _______
A | Value |
B | Reference |
C | Value or Reference, depending on program |
D | Copy |
Question 7 |
When OOP concept did first came into picture?
A | 1970’s |
B | 1980’s |
C | 1993 |
D | 1995 |
Question 8 |
Which of the following is incorrect?
A | class student{ }s; |
B | class student{ }; student s; |
C | class student{ }s[]; |
D | class student{ }; student s[5]; |
Question 9 |
Which is known as a generic class?
A | Abstract class |
B | Final class |
C | Template class |
D | Efficient Code |
Question 10 |
What is the additional feature in classes that was not in structures?
A | Data members |
B | Member functions |
C | Static data allowed |
D | Public access specifier |
Question 11 |
Which of the two features match each other?
A | Inheritance and Encapsulation |
B | Encapsulation and Polymorphism |
C | Encapsulation and Abstraction |
D | Abstraction and Polymorphism |
Question 12 |
Who invented OOP?
A | Alan Kay |
B | Andrea Ferro |
C | Dennis Ritchie |
D | Adele Goldberg |
Question 13 |
Which is most appropriate comment on following class definition?
class Student
{
int a;
public : float a;
};
A | Error : same variable name can’t be used twice |
B | Error : Public must come first |
C | Error : data types are different for same variable |
D | It is correct |
Question 14 |
The object can’t be __________
A | Passed by reference |
B | Passed by value |
C | Passed by copy |
D | Passed as function |
Question 15 |
What is size of the object of following class (64 bit system)?
class student { int rollno; char name[20]; static int studentno; };
A | 20 |
B | 22 |
C | 24 |
D | 28 |
Question 16 |
Which among the following is false?
A | Object must be created before using members of a class |
B | Memory for an object is allocated only after its constructor is called |
C | Objects can’t be passed by reference |
D | Objects size depends on its class data members |
Question 17 |
What is default access specifier for data members or member functions declared within a class without any specifier, in C++?
A | Private |
B | Protected |
C | Public |
D | Depends on compiler |
Question 18 |
Which definition best describes an object?
A | Instance of a class |
B | Instance of itself |
C | Child of a class |
D | Overview of a class |
Question 19 |
Which concept of OOP is false for C++?
A | At least one object should be declared in code |
B | Code can be written without using classes |
C | Code must contain at least one class |
D | A class must have member functions |
Question 20 |
Which is not feature of OOP in general definitions?
A | Code reusability |
B | Modularity |
C | Duplicate/Redundant data |
D | Efficient Code |
Question 21 |
Which header file is required in C++ to use OOP?
A | iostream.h |
B | stdio.h |
C | stdlib.h |
D | OOP can be used without using any header file |
Question 22 |
Which language does not support all 4 types of inheritance?
A | C++ |
B | Java |
C | Kotlin |
D | Small Talk |
Question 23 |
Why Java is Partially OOP language?
A | It supports usual declaration of primitive data types |
B | It doesn’t support all types of inheritance |
C | It allows code to be written outside classes |
D | It does not support pointers |
Question 24 |
How many objects can be declared of a specific class in a single program?
A | 32768 |
B | 127 |
C | 1 |
D | As many as you want |
Question 25 |
Which of the following best defines a class?
A | Parent of an object |
B | Instance of an object |
C | Blueprint of an object |
D | Scope of an object |
Once you are finished, click the button below. Any items you have not completed will be marked incorrect.
Get Results
There are 25 questions to complete.
← |
List |
→ |
Return
Shaded items are complete.
1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 |
End |
Return
You have completed
questions
question
Your score is
Correct
Wrong
Partial-Credit
You have not finished your quiz. If you leave this page, your progress will be lost.
Correct Answer
You Selected
Not Attempted
Final Score on Quiz
Attempted Questions Correct
Attempted Questions Wrong
Questions Not Attempted
Total Questions on Quiz
Question Details
Results
Date
Score
Hint
Time allowed
minutes
seconds
Time used
Answer Choice(s) Selected
Question Text
All done
Need more practice!
Keep trying!
Not bad!
Good work!
Perfect!