In C++ cout is:
a) object
b) class
c) something else

Answer Posted / chandra

cout is an object of class ostream that represents the
standard output stream. It corresponds to the cstdio stream
stdout.

By default, most systems have their standard output set to
the console, where text messages are shown, although this
can generally be redirected.

Because cout is an object of class ostream, we can write
characters to it either as formatted data using for example
the insertion operator (ostream::operator<<) or as
unformatted data using the write member function

Is This Answer Correct ?    21 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can recursive program be written in C++?

882


Explain terminate() function?

796


What is flag in computer?

800


Define the process of error-handling in case of constructor failure?

778


What is virtual destructor? What is its use?

777


When you overload member functions, in what ways must they differ?

788


What is the protected keyword used for?

842


Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).

860


I was a c++ code and was asked to find out the bug in that. The bug was that he declared an object locally in a function and tried to return the pointer to that object. Since the object is local to the function, it no more exists after returning from the function. The pointer, therefore, is invalid outside.

821


Which bitwise operator is used to check whether a particular bit is on or off?

797


What is different in C++, compare with unix?

802


Discussion on error handling of C++ .

843


Show the declaration for a pointer to function returning long and taking an integer parameter.

772


How static variables and local variablesare similar and dissimilar?

795


Explain about templates of C++.

884