JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
Object Oriented Programming interview questions part 13
Object Oriented Programming interview questions part 13
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. The non-template functions can be added with default arguments to already declared functions ____________________
A. If and only if the function is declared again in the same scope
B. If and only if the function is declared only once in the same scope
C. If and only if the function is declared in different scope
D. If and only if the function is declared twice in the program
Show Correct Answer
Correct Answer is :
If and only if the function is declared again in the same scope
2. The using declaration __________
A. Doesn’t carry over the default values
B. Carries over the known default arguments
C. Carries over only the normal arguments
D. Carries over only few default arguments
Show Correct Answer
Correct Answer is :
Carries over the known default arguments
3. The names given to the default arguments are only looked up and ________________. And are bound during declaration.
A. Checked for availability
B. Checked for random access
C. Checked for accessibility
D. Checked for feasibility
Show Correct Answer
Correct Answer is :
Checked for accessibility
4. The default argument get bound during declaration ________________
A. And are never executed
B. And are executed simultaneously
C. But are executed only if priority is given
D. But are executed during function call
Show Correct Answer
Correct Answer is :
But are executed during function call
5. The virtual function overrides ____________
A. Do not acquire base class declaration of default arguments
B. Do acquire base class declaration of default arguments
C. Do not link with the default arguments of base class
D. Do link with the default argument but only of derived classes
Show Correct Answer
Correct Answer is :
Do not acquire base class declaration of default arguments
6. What is 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
Show Correct Answer
Correct Answer is :
Deallocates a block of memory
7. 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
Show Correct Answer
Correct Answer is :
It should be deleted using delete operator
8. Does delete return any value?
A. Yes, positive value
B. Yes, negative value
C. Yes, zero value
D. No
Show Correct Answer
Correct Answer is :
No
9. Which type of value is resulted from the delete operator?
A. void
B. void pointer
C. null pointer
D.
Show Correct Answer
Correct Answer is :
void
10. If delete is used to delete an object which was not allocated using new _______________
A. Then out of memory error arises
B. Then unreachable code error arises
C. Then unpredictable errors may arise
D. Then undefined variable error arises
Show Correct Answer
Correct Answer is :
Then unpredictable errors may arise
11. Delete operator _________________
A. Can be used on pointers with null value
B. Can be used on pointers with void value
C. Can be used on pointer with value 0
D. Can be used on pointer with any value
Show Correct Answer
Correct Answer is :
Can be used on pointer with value 0
12. When delete operator is used ___________________ (If object has a destructor)
A. Object destructor is called after deallocation
B. Object destructor is called before deallocation
C. Object destructor is not used
D. Object destructor can be called anytime during destruction
Show Correct Answer
Correct Answer is :
Object destructor is called before deallocation
13. If delete is applied to an object whose l-value is modifiable, then _______________ after the object is deleted.
A. Its value is defined as null
B. Its value is defined as void
C. Its value is defined as 0
D. Its value is undefined
Show Correct Answer
Correct Answer is :
Its value is undefined
14. How many variants of delete operator are available?
A. Only 1
B. Only 2
C. Only 3
D. Only 4
Show Correct Answer
Correct Answer is :
Only 2
15. Which is the correct syntax to delete a single object?
A. delete *objectName;
B. objectName delete;
C. delete objectName;
D. objectName *delete;
Show Correct Answer
Correct Answer is :
delete objectName;
16. Which is the correct syntax to delete array of objects?
A. delete [] objectName;
B. delete * objectName;
C. objectName[] delete;
D. delete objectName[];
Show Correct Answer
Correct Answer is :
delete [] objectName;
17. Which cases among the following produces the undefined result?
A. delete [] on an independent object
B. delete on an object array
C. delete [] on an object and delete on object array
D. Undefined result is never produced
Show Correct Answer
Correct Answer is :
delete [] on an object and delete on object array
18. The delete operator __________________
A. Invokes function operator delete
B. Invokes function defined by user to delete
C. Invokes function defined in global scope to delete object
D. Doesn’t invoke any function
Show Correct Answer
Correct Answer is :
Invokes function operator delete
19. For objects that are not of class type ______________
A. Global delete operator is invoked
B. Local delete operator is invoked
C. Global user defined function is invoked
D. Local function to delete object is called
Show Correct Answer
Correct Answer is :
Global delete operator is invoked
20. The delete operator __________________________
A. Can be defined for each class
B. Can’t be defined for each class
C. Can be defined globally only
D. Can’t be defined in a program explicitly
Show Correct Answer
Correct Answer is :
Can be defined for each class
Similar Interview Questions
Search for latest jobs
Find Jobs