1.

Which function is used to write a single character to console in C++?(a) cout.put(ch)(b) cout.putline(ch)(c) write(ch)(d) printf(ch)I had been asked this question at a job interview.The question is from Basics topic in section Basics Concepts of C++ of C++

Answer»

Right choice is (a) cout.put(ch)

Explanation: C++ provides cout.put() FUNCTION to WRITE a single character to console whereas others are used to write EITHER a single or multiple CHARACTERS.



Discussion

No Comment Found

Related InterviewSolutions