Cpp Programming 12

COEP
Lets Crack Online Exam

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

Subject: Cpp Programming 12

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

 

Q1. How many ways of passing a parameter are there in c++?

a) 1

b) 2

c) 3

d) 4

 

Q2. Which is used to keep the call by reference value as intact?

a) static

b) const

c) absolute

d) none of the mentioned

 

Q3. By default how the value are passed in c++?

a) call by value

b) call by reference

c) call by pointer

d) none of the mentioned

 

Q4. What will happen when we use void in argument passing?

a) It will not return value to its caller

b) It will return value to its caller

c) both a and b are correct

d) none of the mentioned

 

Q5. How many types of returning values are present in c++?

a) 1

b) 2

c) 3

d) 4

 

Q6. What will you use if you are not intended to get a return value?

a) static

b) const

c) volatile

d) void 

 

Q7. Where does the return statement returns the execution of the program?

a) main function

b) caller function

c) same function

d) none of the mentioned

 

Q8. If the user didn’t supply the user value means, then what value will it take?

a) default value

b) rise an error

c) both a and b

d) none of the mentioned

 

Q9. Where does the default parameter can be placed by the user?

a) leftmost

b) rightmost

c) both a and b

d) none of the mentioned

 

Q10. Which value will it take when both user and default values are given?

a) user value

b) default value

c) custom value

d) none of the mentioned

 

Q11. What we can’t place followed by the non-default arguments?

a) trailing arguments

b) default arguments

c) both a and b

d) none of the mentioned

 

Q12. If we start our function call with default arguments means, what will be proceeding arguments?

a) user argument

b) empty arguments

c) default arguments

d) none of the mentioned 

 

Q13. What is the default return type of a function ?

a) int

b) void

c) float

d) char

 

Q14. What is data hiding ?

a) It is related with hiding internal object details

b) It is related with showing internal object details

c) It is related with datatypes

d) None of above

 

Q15. What is class in c++ ?

a) When you define a class, you define a blueprint for a data type

b) When you define a class, you make get more funtionality

c) When you define a class, you define the logic

d) When you define a class, you make debugging

 

Q16. What is object in C++ ?

a) Object is part of syntax of a class

b) Object is datatype of a class

c) Object is an instance of a class

d) Object is function of a class

 

Q17. What is purpose of abstract class ?

a) to provide help with database connectivity

b) to provide data input to other classes

c) to provide security to other classes

d) to provide an appropriate base class from which other classes can inherit

 

Q18. Classes that can be used to instantiate objects are called concrete classes

a) True

b) False

c) these are Abstract classes

d) these are virtual classes

 

Q19. What is default visibility mode for members of classes in C++ ?

a) Private

b) Public

c) Protected

d) Depends 

 

Q20. Which is more memory efficient ?

a) structure

b) union

c) both use same memory

d) depends on a programmer

 

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

 

Q1. Answer: c

 

Q2. Answer: b

 

Q3. Answer: a

 

Q4. Answer: a

 

Q5. Answer: c

 

Q6. Answer: d

 

Q7. Answer: b

 

Q8. Answer: a

 

Q9. Answer: b

 

Q10. Answer: a

 

Q11. Answer: b

 

Q12. Answer: c

 

Q13. Answer: b

 

Q14. Answer: a

 

Q15. Answer: a

 

Q16. Answer: c

 

Q17. Answer: d

 

Q18. Answer: a

 

Q19. Answer: a

 

Q20. Answer: c