Cpp Programming 2

COEP
Lets Crack Online Exam

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

Subject: Cpp Programming 2

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

 

Q1. Which of the following type of class allows only one object of it to be created?

a) Virtual class

b) Abstract class

c) Singleton class

d) Friend class

 

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

a) Copy constructor

b) Friend constructor

c) Default constructor

d) Parameterized constructor

 

Q3. Which of the following statements is correct?

a) Base class pointer cannot point to derived class

b) Derived class pointer cannot point to base class

c) Pointer to derived class cannot be created

d) Pointer to base class cannot be created

 

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

a) Static function

b) Friend function

c) Const function

d) Virtual function

 

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

a) Data hiding

b) Dynamic Typing

c) Dynamic binding

d) Dynamic loading

 

Q6. Which of the following term is used for a function defined inside a class?

a) Member Variable

b) Member function

c) Class function

d) Classic function 

 

Q7. Which of the following concept of oops allows compiler to insert arguments in a function call if it is not specified?

a) Call by value

b) Call by reference

c) Default arguments

d) Call by pointer

 

Q8. How many instances of an abstract class can be created?

a) 1

b) 5

c) 13

d) 0

 

Q9. Which of the following cannot be friend?

a) Function

b) Class

c) Object

d) Operator function

 

Q10. Which of the following concepts of OOPS means exposing only necessary information to client?

a) Encapsulation

b) Abstraction

c) Data hiding

d) Data binding

 

Q11. Why reference is not same as a pointer?

a) A reference can never be null

b) A reference once established cannot be changed

c) Reference doesn’t need an explicit dereferencing mechanism

d) All of the above

 

Q12. cout is a/an __________

a) operator

b) function

c) object

d) macro 

 

Q13. Which of the following concepts provides facility of using object of one class inside another class?

a) Encapsulation

b) Abstraction

c) Composition

d) Inheritance

 

Q14. How many types of polymorphisms are supported by C++?

a) 1

b) 2

c) 3

d) 4

 

Q15. Which of the following is an abstract data type?

a) int

b) double

c) string

d) Class

 

Q16. Which of the following concepts means adding new components to a program as it runs?

a) Data hiding

b) Dynamic typing

c) Dynamic binding

d) Dynamic loading

 

Q17. Which of the following statement is correct?

a) A constructor is called at the time of declaration of an object

b) A constructor is called at the time of use of an object

c) A constructor is called at the time of declaration of a class

d) A constructor is called at the time of use of a class

 

Q18. Which of the following correctly describes overloading of functions?

a) Virtual polymorphism

b) Transient polymorphism

c) Ad-hoc polymorphism

d) Pseudo polymorphism 

 

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

a) Top-down

b) Bottom-up

c) Right-left

d) Left-right

 

Q20. Which of the following is correct about function overloading?

a) The types of arguments are different

b) The order of argument is different

c) The number of argument is same

d) Both A and B 

 

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

 

Q1. Answer: c

 

Q2. Answer: b

 

Q3. Answer: b

 

Q4. Answer: b

 

Q5. Answer: c

 

Q6. Answer: b

 

Q7. Answer: c

 

Q8. Answer: d

 

Q9. Answer: c

 

Q10. Answer: c

 

Q11. Answer: d

 

Q12. Answer: c

 

Q13. Answer: c

 

Q14. Answer: b

 

Q15. Answer: d

 

Q16. Answer: d

 

Q17. Answer: a

 

Q18. Answer: c

 

Q19. Answer: b

 

Q20. Answer: d