Questoin from c++

why we use #include iostream in source code?

#include tells the compiler to pull in the contents of the headeriostream. That header provides, among other things, declarations of the objects std::cinandstd::cout`. So the basic “Hello, world” program looks like this:

int main() {
std::cout << “Hello, world\n”;
return 0;

1 Like

To call predefined function available in library.

iostream is the header file which contains cout and cin and many other command.

we use #include<iostream.h> because it store the input and output.