C++ Short Questions & Answers | C Plus Plus Programming Language Quiz

Questions
25. The class which derives the property from other is called as ________.
  • [A] super
  • [B} derived
  • [C} subordinarte
  • [A] base

Answer: Option [B]

26. The other name for derived class is __________
  • [A] subclass
  • [B} super class
  • [C} subordinate class
  • [A] base class

Answer: Option [A]

27. What does your class can hold?
  • [A] data
  • [B} functions
  • [C} both a & b
  • [A] none of the mentioned

Answer: Option [C]

28. ___________ is an entry controlled looping statement.
  • [A] for
  • [B} repeat
  • [C} until
  • [A] do..while

Answer: Option [A]

29. Which of the following is an exit controlled looping statement
  • [A] for
  • [B} while
  • [C} do..while
  • [A] repeat

Answer: Option [C]

30. What is the index number of the last element of an array with 9 elements?
  • [A] 9
  • [B} 8
  • [C} 0
  • [A] Programmer-defined

Answer: Option [B]

31. Which of the following accesses the seventh element stored in array?
  • [A] array[6];
  • [B} array[7];
  • [C} array(7);
  • [A] array;

Answer: Option [A]

32. When a class A inhereits its properties from class B and class C, then the inheritance is said to be ___________ inheritance
  • [A] multiple
  • [B} multilevel
  • [C} single
  • [A] hybrid

Answer: Option [A]

33. Polymorphism is not implemented through ____________.
  • [A] function overloading
  • [B} operator overloading
  • [C} operator overloading
  • [A] contructors and destructors

Answer: Option [D]

34. ____________ function specifies the required number of fields to be used while displaying the output value
  • [A] with()
  • [B} width()
  • [C} fill()
  • [A] setf()

Answer: Option [B]

VIEW ALL UGC NET EBooks
35. ____________ function clears the flags.
  • [A] width()
  • [B} precision()
  • [C} unsetf()
  • [A] setf()

Answer: Option [C]

36. The primary difference between float and double is in the ____ of the value they hold.
  • [A] address.
  • [B} magnitude.
  • [C} sign.
  • [A] decimal point.

Answer: Option [B]