WRITE A C++ "Hello World!" Program


WRITE A 

C++ "Hello World!" Program


#include <iostream>

int main() {
    std::cout << "Hello World!";
    return 0;
}

Output

Hello World!
#include a preprocessor directive use to include files in our program.
COUT<< USE in our program to print output on the screen.
  1. RETURN 0 statement is the Exit status of the program. In simple terms, the program ends with this statement.
  2. What is the function of #include Iostream in C++?
    It is the predefined library function used for input and output also called as header files.
I/O stream objects such as cin, cout, clog, etc.
 std::cout, THAT allows us to send data to the console to be printed as text. cout stands for “character output”






Comments