Would you like to submit the test?

C++ Questions And Answers Sample Test 1


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

C++ Test 1


You have scored 3 out of 10
You Scored:2
Total Questions:2
Attended Questions:2
Correct Answered:2
1. Which constructor function is designed to copy objects of the same class type?





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

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





3.
Which of the following statement is correct?





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





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





6. Which of the following keywords is used to control access to a class member?





7. Which of the following statement is incorrect?





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





9. Which of the following statement will be correct if the function has three arguments passed to it?





10. Which of the following statement is correct?





11.
Which of the following statements is correct?

Once a reference variable has been defined to refer to a particular variable it can refer to any other variable.
A reference is not a constant pointer.





12. Which of the following cannot be declared as virtual?





13. Which of the following statements is correct?





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





15. Which of the following is used to make an abstract class?





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





17. Which of the following statements is incorrect?





18. Which of the following statement is correct?





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





20. Which of the following statement is correct?





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





22. Can a class have virtual destructor?





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





24.
Which of the following statements is correct?

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





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





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





27. Constructors __________ to allow different approaches of object construction.





28. Which of the following statement is correct?





29. Which of the following statement is correct?





30. When are the Global objects destroyed?







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.