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 of the following keywords is used to control access to a class member?





2. Which of the following can be overloaded?





3. Which of the following statement is correct?





4.
Which of the following is correct about the statements given below?

All operators can be overloaded in C++.
We can change the basic meaning of an operator in C++.





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





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





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





8. What happens when a class with parameterized constructors and having no default constructor is used in a program and we create an object that needs a zero-argument constructor?





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





10. Which one of the following is the correct way to declare a pure virtual function?





11. Can a class have virtual destructor?





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





13.
Which of the following statements is correct?
Pointer to a reference and reference to a pointer both are valid.
When we use reference, we are actually referring to a referent.





14. Which of the following statements is incorrect?





15. Which of the following header file includes definition of cin and cout?





16. Which of the following statement is correct with respect to the use of friend keyword inside a class?





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





18. Which of the following function / type of function cannot be overloaded?





19. Which of the following provides a reuse mechanism?





20. Which one of the following options is correct?





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





22. What is correct about the static data member of a class?





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





24. Which of the following function prototype is perfectly acceptable?





25. Which of the following statement is incorrect?





26. Which of the following statement is incorrect?





27. Which of the following statement is correct?





28. Destructor has the same name as the constructor and it is preceded by ______ .





29.
Which of the following statements is correct?

An array of references is acceptable.
We can also create a reference to a reference.





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







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.