OOPS Set 1
Free Online Best OOPS MCQ Questions for improve your basic knowledge of C++. This OOPS Set 1 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 1.
You scored %%SCORE%% out of %%TOTAL%%.
Your performance has been rated as %%RATING%%
Your answers are highlighted below.
Question 1 |
What are inbuilt classes?
A | The predefined classes in a language |
B | The classes that are defined by the user |
C | The classes which are meant to be modified by the user |
D | The classes which can’t be used by the user |
Question 2 |
What is a delete operator?
A | Deallocates a block of memory |
B | Deallocates whole program memory |
C | Deallocates only primitive data memory |
D | Deallocates all the data reserved for a class |
Question 3 |
To catch the exceptions ___________________
A | An object must be created to catch the exception |
B | A variable should be created to catch the exception |
C | An array should be created to catch all the exceptions |
D | A string have to be created to store the exception |
Question 4 |
What is the InputStream class meant for?
A | To handle all input streams |
B | To handle all output streams |
C | To handle all input and output streams |
D | To handle only input from file |
Question 5 |
What is the new operator?
A | Allocates memory for an object or array |
B | Allocates memory for an object or array and returns a particular pointer |
C | Used as return type when an object is created |
D | Used to declare any new thing in a program |
Question 6 |
How many catch blocks can a single try block can have?
A | Only 1 |
B | Only 2 |
C | Maximum 127 |
D | As many as required |
Question 7 |
What are automatic variables?
A | Global variables |
B | Implicit/temporary variables |
C | Local variables |
D | System variables |
Question 8 |
The object ________________
A | Can be passed by reference |
B | Can be passed by value |
C | Can be passed by reference or value |
D | Can be passed with reference |
Question 9 |
If object is passed by value ______________
A | Copy constructor is used to copy the values into another object in the function |
B | Copy constructor is used to copy the values into temporary object |
C | Reference to the object is used to access the values of the object |
D | Reference to the object is used to created new object in its place |
Question 10 |
Pass by reference of an object to a function _______________
A | Affects the object in called function only |
B | Affects the object in prototype only |
C | Affects the object in caller function |
D | Affects the object only if mentioned with & symbol with every call |
Question 11 |
Inbuilt class __________________________
A | Must be included before use |
B | Are not necessary to be included for use |
C | Are used by the compiler only |
D | Can be modified by programmer always |
Question 12 |
The memory for automatic variables ___________________
A | Have to be allocated and deallocated explicitly |
B | Are allocated and deallocated automatically |
C | Is never actually allocated |
D | Are never safe |
Question 13 |
Which among the following is a correct statement for variables?
A | Variable can be declared many times |
B | Variable can be declared only one time |
C | Variable declaration can’t be done more than ones |
D | Variable declaration is always done more than one time |
Question 14 |
Which among the following not an inbuilt class in C++?
A | System |
B | Color |
C | String |
D | Functions |
Question 15 |
If an object is allocated using new operator ____________
A | It should be deleted using delete operator |
B | It can’t be deleted using delete operator |
C | It may or may not be deleted using delete operator |
D | The delete operator is not applicable |
Question 16 |
What doesn’t inbuilt classes contain?
A | Function prototype |
B | Function declaration |
C | Function definitions |
D | Objects |
Question 17 |
Multiple catch blocks __________________
A | Are mandatory for each try block |
B | Can be combined into a single catch block |
C | Are not possible for a try block |
D | Can never be associated with a single try block |
Question 18 |
Which are the two blocks that are used to check error and handle the error?
A | Try and catch |
B | Trying and catching |
C | Do and while |
D | TryDo and Check |
Question 19 |
Passing object to a function _______________
A | Can be done only in one way |
B | Can be done in more than one ways |
C | Is not possible |
D | Is not possible in OOP |
Question 20 |
What are two exception classes in hierarchy of java exceptions class?
A | Runtime exceptions only |
B | Compile time exceptions only |
C | Runtime exceptions and other exceptions |
D | Other exceptions |
Question 21 |
What is extern variable?
A | Variables to be used that are declared in another object file |
B | Variables to be used that are declared in another source file |
C | Variables to be used that are declared in another executable file |
D | Variables to be used that are declared in another program |
Question 22 |
Microsoft C++ Components extensions support new keyword to _____________
A | Modify a vtable |
B | Replace a vtable slot entry |
C | Add new vtable slot entries |
D | Rearrange vtable slot entries |
Question 23 |
Which among the following is not a method of Throwable class?
A | public String getMessage() |
B | public Throwable getCause() |
C | public void printStackTrace() |
D | public Char toString() |
Question 24 |
Which symbol should be used to pass the object by reference in C++?
A | & |
B | @ |
C | $ |
D | $ or & |
Question 25 |
What happens when new fails?
A | Returns zero always |
B | Throws an exception always |
C | Either throws an exception or returns zero |
D | Terminates the program |
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!