Google News
logo
CPP - Quiz(MCQ)
Which function is used to read a single character from the console in C++?
A)
scanf(ch)
B)
read(ch)
C)
cin.get(ch)
D)
getline(ch)

Correct Answer :   cin.get(ch)


Explanation : C++ provides cin.get() function to read a single character from console whereas others are used to read either a single or multiple characters.

Advertisement