Would you like to submit the test?

C++ Questions And Answers Sample Test 7


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

C++ Test 7


You have scored 3 out of 10
You Scored:2
Total Questions:2
Attended Questions:2
Correct Answered:2
1. Which of the following statement is incorrect?





2. Which of the following statement is correct?





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





4. Which of the following access specifier is used as a default in a class definition?





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

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





6.
Which of the following statements is correct?
We can return a global variable by reference.
We cannot return a local variable by reference.





7. Reference is like a _____.





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





9. Which of the following gets called when an object goes out of scope?





10. Which of the following is not the member of class?





11. Which of the following means "The use of an object of one class in definition of another class"?





12. Which of the following statement is correct?





13.
 It is a __________ error to pass arguments to a destructor.





14.
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.





15. What will happen if a class is not having any name?





16. Which of the following statement is correct?





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





18.
Which of the following statement is incorrect?





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





20. Which of the following statements is correct?





21. Which of the following statement is correct?





22. Which of the following statement is correct regarding destructor of base class?





23. Which of the following statements is correct about the constructors and destructors?





24. When are the Global objects destroyed?





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





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





27. Which one of the following options is correct?





28. Which of the following statement is correct?





29. Which of the following statement is incorrect?





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







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.