OOPS Questions and Answers updated daily – Computer Knowledge



24 OOPS Questions and answers section with explanation for various online exam preparation, various interviews, Computer Knowledge OOPS online test. OOPS Questions with detailed description, explanation will help you to master the topic.

OOPS Questions

1. A function that does the same operation on different data types is to be implemented using 



SHOW ANSWER
Correct Ans:function templates
Explanation:


2. One of the disadvantages of pass-by reference is that the called function may inadvertently corrupt the caller's data. This can be avoided by 



SHOW ANSWER
Correct Ans:declaring the formal parameters constant
Explanation:
If the formal parameters are declared constants, the compiler will not allow any changes to be made. So the question of inadvertently corrupting the caller's data, does not arise at all.


3. Which of the following decides if a function that is declared inline is indeed going to be treated inline in the executable code? 



SHOW ANSWER
Correct Ans:Compiler
Explanation:


4. Assume that the random number generating function - rand( ), returns an integer between 0 and 10000 (both inclusive). If you want to simulate the throwing of a die using this random function, use the expression 



SHOW ANSWER
Correct Ans:rand ( ) % 6 + 1
Explanation:
It should randomly generate any integer between 1 and 6. rand( ) % 6 returns an integer from 0 to 5. To make it 1 to 6, we need to add 1


5. If a piece of code can be implemented as a macro or as an inline function, which of the following factors favour implementation as an inline function? 



SHOW ANSWER
Correct Ans:Both (a) & (b)
Explanation:


6. Which of the following parameter passing mechanism(s) is/are supported by C++, but not by C? 



SHOW ANSWER
Correct Ans:Pass by reference
Explanation:
As such C does not support pass by reference. But it can be simulated by using pointers.


7. The compiler identifies a virtual function to be pure 



SHOW ANSWER
Correct Ans:if it is equated to 0
Explanation:


8. If many functions-have the same name, which of the following information, if present, will be used by the compiler to invoke the correct function to be used? 



SHOW ANSWER
Correct Ans:Both (a) and (c)
Explanation:


9. Choose the correct statements regarding inline functions. 



SHOW ANSWER
Correct Ans:Both (a) and (c)
Explanation:
Each occurrence of the inline function call wiLl be replaced by its body. No function call overhead will be there but the size of the code will increase.


10. Choose the correct statements: 



SHOW ANSWER
Correct Ans:All of these
Explanation:


11. Which of the following remarks about the differences between constructors and destructors are correct?



SHOW ANSWER
Correct Ans:Both (a) and (b)
Explanation:


12. A constructor is called whenever 



SHOW ANSWER
Correct Ans:an object is declared
Explanation:


13. Choose the correct statements from the following: 



SHOW ANSWER
Correct Ans:Both (a) & (b)
Explanation:


14. For a method to be an interface between the outside world and a class, it has to be declared 



SHOW ANSWER
Correct Ans:public
Explanation:


15. A class having no name 



SHOW ANSWER
Correct Ans:All of these
Explanation:


16. Let class APE be a friend of class SAPIEN. Let class HUMAN be a child class of SAPIEN and let MONKEY be a child class of APE. Then 



SHOW ANSWER
Correct Ans:All of these
Explanation:


17. Which of the following cannot be declared static?



SHOW ANSWER
Correct Ans:Both (a) & (b)
Explanation:


18. Which of the following comments about inline comments are true? 



SHOW ANSWER
Correct Ans:Both (a) & (c)
Explanation:


19. Forgetting to include a file (like cmath or math.h) that is necessary will result in



SHOW ANSWER
Correct Ans:error at link time
Explanation:


20. Overloading is otherwise called as 



SHOW ANSWER
Correct Ans:ad-hoc polymorphism
Explanation:



12


Are you seeking for good platform for practicing OOPS questions in online. This is the right place. The time you spent in Fresherslive will be the most beneficial one for you.

Online Test on OOPS @ Fresherslive

This page provides important questions on OOPS along with correct answers and clear explanation, which will be very useful for various Interviews, Competitive examinations and Entrance tests. Here, Most of the OOPS questions are framed with Latest concepts, so that you may get updated through these OOPS Online tests. OOPS Online Test questions are granted from basic level to complex level.

Why To Practice OOPS Test questions Online @ Fresherslive?

OOPS questions are delivered with accurate answer. For solving each and every question, very lucid explanations are provided with diagrams wherever necessary.

Practice in advance of similar questions on OOPS may improve your performance in the real Exams and Interview.

Time Management for answering the OOPS questions quickly is foremost important for success in Competitive Exams and Placement Interviews.

Through Fresherslive OOPS questions and answers, you can acquire all the essential idea to solve any difficult questions on OOPS in short time and also in short cut method.

Winners are those who can use the simplest method for solving a question. So that they have enough time for solving all the questions in examination, correctly without any tense. Fresherslive provides most simplest methods to answer any tough questions. Practise through Fresherslive test series to ensure success in all competitive exams, entrance exams and placement tests.

Why Fresherslive For OOPS Online Test Preparation?

Most of the job seekers finding it hard to clear OOPS test or get stuck on any particular question, our OOPS test sections will help you to success in Exams as well as Interviews. To acquire clear understanding of OOPS, exercise these advanced OOPS questions with answers.

You're Welcome to use the Fresherslive Online Test at any time you want. Start your beginning, of anything you want by using our sample OOPS Online Test and create yourself a successful one. Fresherslive provides you a new opportunity to improve yourself. Take it and make use of it to the fullest. GOODLUCK for Your Bright Future.


FreshersLive - No.1 Job site in India. Here you can find latest 2017 government as well as private job recruitment notifications for different posts vacancies in India. Get top company jobs for both fresher and experienced. Job Seekers can get useful interview tips, resume services & interview Question and answer. Practice online test free which is helpful for interview preparation. Register with us to get latest employment news/rojgar samachar notifications. Also get latest free govt and other sarkari naukri job alerts daily through E-mail.