Multiple choice

'ostream.put method' is used to write

  1. a string

  2. a char

  3. an int

  4. all of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The ostream.put() method in C++ is specifically designed to write a single character to the output stream. It takes a char as parameter and writes it to the stream.