C++ Exam Questions with Solutions | Multiple Choice Questions and Answers

Sports GK Questions and Answers 2024 (Latest Updated)

Awards & Honours GK Questions 2024 (Latest Updated)

Questions
49. ________ function is a function in which expansion of the function takes place rather than execution.
  • [A] Friend.
  • [B} Inline.
  • [C} Recursive
  • [A] Member

Answer: Option [B]

50. The name of a function variable or class is called____
  • [A] libraries
  • [B} stream
  • [C} identifiers
  • [A] keywords

Answer: Option [B]

Advertisement
Article and Schedule Quiz Start Test!
DOWNLOAD CURRENT AFFAIRS PDF FROM APP
51. << is called as _______________ operator
  • [A] insertion
  • [B} extraction
  • [C} greater than.
  • [A] lesser than.

Answer: Option [A]

52. _____________ is a variable preserves its value between function calls.
  • [A] extern
  • [B} auto
  • [C} register
  • [A] register

Answer: Option [D]

53. ________ is a default access specifier for members of class in C++.
  • [A] protected
  • [B} public
  • [C} private
  • [A] default

Answer: Option [C]

54. In how many ways is polymorphism achived in C++?
  • [A] 2
  • [B} 1
  • [C} 3
  • [A] 4

Answer: Option [C]

55. The ______ keyword brings the members of a namespace into view.
  • [A] view
  • [B} using
  • [C} additive
  • [A] show

Answer: Option [B]

56. ________ is the mechanism which allows a class A to inherit properties of a class B
  • [A] Data abstraction
  • [B} Encapsulation
  • [C} Inheritance
  • [A] Polymorphism

Answer: Option [C]

57. To overload an operator_________________ keyword must be used along with the operator to be overloaded.
  • [A] Over
  • [B} Overload
  • [C} void
  • [A] Operator

Answer: Option [D]

58. Which of the following is not a keyword?
  • [A] inherit
  • [B} auto
  • [C} extern
  • [A] void

Answer: Option [A]

59. The result of the expression 15%3 in c++ is ___________.
  • [A] 5
  • [B} 3
  • [C} 0
  • [A] error

Answer: Option [C]

60. ___________ variables can be initialized only once.
  • [A] void
  • [B} static
  • [C} const
  • [A] int

Answer: Option [B]

Random GK Questions

Assam Direct Recruitment Test Series

Computer Science Topics