C++ MCQ Question and Answer

C++ MCQ Question and Answer
91. Observe following function declaration and choose the best answer:

int  divide ( int a, int b = 2 )
  • Variable b is of integer type and will always have value 2
  • Variable a and b are of int type and the initial value of both variables is 2
  • Variable b is international scope and will have value 2
  • Variable b will have value 2 if not specified when calling function
Show Answer
92. The keyword endl
  • Ends the execution of program where it is written
  • Ends the output in cout statement
  • Ends the line in program. There can be no statements after endl
  • Ends current line and starts a new line in cout statement.
Show Answer
93. Strings are character arrays. The last index of it contains the null-terminated character
  • \n
  • \t
  • \0
  • \1
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test