Would you like to submit the test?

C++ Questions And Answers Sample Test 2


Sample C++ Test 2 for you to Practice. Evaluate your C++ Test 2 test answering skills by trying the online C++ Sample Test 2 and know your score.

C++ Test 2


You have scored 3 out of 10
You Scored:2
Total Questions:2
Attended Questions:2
Correct Answered:2
1.
Which one of the following is correct about the statements given below?

All function calls are resolved at compile-time in Procedure Oriented Programming.
All function calls are resolved at compile-time in OOPS.





2. Which of the following provides a reuse mechanism?





3. Which of the following concepts means determining at runtime what method to invoke?





4. Can a class have virtual destructor?





5.
Which of the following statement is correct?





6. Which of the following statement is correct about the references?





7. Which of the following type of data member can be shared by all instances of its class?





8. Which of the following statements is correct when a class is inherited publicly?





9. Which of the following statement is correct?





10. Which of the following statement is correct?





11. Which of the following two entities (reading from Left to Right) can be connected by the dot operator?





12. Which of the following is an invalid visibility label while inheriting a class?





13. Which of the following are available only in the class hierarchy chain?





14. Which of the following are NOT provided by the compiler by default?





15. Which of the following statements regarding inline functions is correct?





16. A constructor that accepts __________ parameters is called the default constructor.





17.
Functions can be declared to return a reference type. There are reasons to make such a declaration/Which of the following reasons are correct?

The information being returned is a large enough object that returning a reference is more efficient than returning a copy.
The type of the function must be a R-value.





18. Which of the following function declaration is/are incorrect?





19. A union that has no constructor can be initialized with another union of __________ type.





20. Which of the following statement is correct?





21.
  Which of the following approach is adapted by C++?





22.
Which inheritance type is used in the class given below? 
class A : public X, public Y {}





23. Reference is like a _____.





24.
What happens when we try to compile the class definition in following code snippet?

class Birds {};
class Peacock : protected Birds {};





25. Which of the following also known as an instance of a class?





26. Constructor is executed when _____.





27. Which of the following statement is incorrect?





28. A reference is declared using the _____ symbol.





29. Which of the following is not a type of constructor?





30.
Which of the following statements is correct?

Change a reference changes the referent.
We can create an array of references.







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.