Question 89Asked in BPSC TRE 2.0 (2023) Computer Class 9-10

Which of the following is the correct syntax to read the single character to console in the C++ language?

  1. Aread ch()
  2. Bgetlinech()
  3. Cget(ch)
  4. DMore than one of the above
  5. ENone of the above
Show answerHide answer

Correct answer: (E) None of the above

Explanation

None of the listed forms is valid C++ (the correct usage is cin.get(ch)), so the answer is None of the above.

From BPSC TRE 2.0 (2023) Computer Class 9-10 — Previous Year Paper

This is question 89 of BPSC TRE 2.0 (2023) Computer Class 9-10 — Previous Year Paper. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.