Cpp Programming 15

COEP
Lets Crack Online Exam

IT Interview Exam Questions: Cpp Programming 15 (IT Interview Exam Question, IT Campus Placement)

Subject: Cpp Programming 15

Part 15: List for questions and answers of C ++ Language

 

Q1. What does your class can hold?

a) data

b) functions

c) both a and b

d) none of the mentioned

 

Q2. How many specifiers are present in access specifiers in class?

a) 1

b) 2

c) 3

d) 4

 

Q3. Which is used to define the member of a class externally?

a) :

b) ::

c) #

d) none of the mentioned

 

Q4. Which other keywords are also used to declare the class other than class?

a) struct

b) union

c) object

d) both a and b

 

Q5. Which interface determines how your class will be used by other program?

a) public

b) private

c) protected

d) None of the mentioned

 

Q6. Pick out the correct statement about override

a) Overriding refers to a derived class function that has the same name and signature as a base class virtual function

b) Overriding has different names

c) both a and b

d) None of the mentioned 

 

Q7. How many ways of reusing are there in class hierarchy?

a) 1

b) 2

c) 3

d) 4

 

Q8. How many kinds of classes are there in c++?

a) 1

b) 2

c) 3

d) 4

 

Q9. What is meant by polymorphism?

a) class having many forms

b) class having only single form

c) class having two forms

d) none of the mentioned

 

Q10. How many types of inheritance are there in c++?

a) 2

b) 3

c) 4

d) 5

 

Q11. Where is the derived class is derived from?

a) derived

b) base

c) both a and b

d) None of the mentioned

 

Q12. Pick out the correct statement

a) A derived class’s constructor cannot explicitly invokes its base class’s constructor

b) A derived class’s destructor cannot invoke its base class’s destructor

c) A derived class’s destructor can invoke its base class’s destructor

d) None of the mentioned

 

Q13. Which of the following can derived class inherit?

a) members

b) functions

c) both a and b

d) None of the mentioned 

 

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

a) SAPIEN is not a friend of APE

b) APE is not a friend of HUMAN

c) MONKEY is not a friend of SAPIEN

d) All of these

 

Q15. A class having no name

a) cannot be passed as an argument

b) cannot have a constructor

c) cannot have a destructor

d) All of these

 

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

a) private

b) protected

c) public

d) external

 

Q17. The fields in a class, of a C++ program are by default

a) protected

b) public

c) private

d) none of the above

 

Q18. Which class is used to design the base class?

a) abstract class

b) derived class

c) base class

d) None of the mentioned

 

Q19. Which is used to create a pure virtual function ?

a) $

b) =0

c) &

d) ! 

 

Q20. Which is also called as abstract class?

a) virtual function

b) pure virtual function

c) derived class

d) None of the mentioned 

 

Part 15: List for questions and answers of C ++ Language

 

Q1. Answer: c

 

Q2. Answer: c

 

Q3. Answer: b

 

Q4. Answer: d

 

Q5. Answer: a

 

Q6. Answer: a

 

Q7. Answer: b

 

Q8. Answer: b

 

Q9. Answer: a

 

Q10. Answer: d

 

Q11. Answer: b

 

Q12. Answer: b

 

Q13. Answer: c

 

Q14. Answer: d

 

Q15. Answer: d

 

Q16. Answer: c

 

Q17. Answer: c

 

Q18. Answer: a

 

Q19. Answer: b

 

Q20. Answer: b