Hello World In C++ Programming
The program is a simple C++ program that prints the message "Hello World...!" to the console. Let's break down the program line by line:
- #include: This line is a preprocessor directive that includes the iostream library, which provides the cout object used to output data to the console.
- using namespace std;: This line declares that we want to use the std namespace. The std namespace is used by the C++ Standard Library, which includes functions and objects that are commonly used in C++ programs.
- int main(): This is the main function of the program. Every C++ program must have a main() function, which is the starting point of the program.
- {: The opening curly brace marks the beginning of the main function.
- cout<<"Hello World...!";: This line uses the cout object from the iostream library to output the message "Hello World...!" to the console.
- return 0;: This line returns an integer value of 0 to the operating system, indicating that the program has executed successfully.
- }: The closing curly brace marks the end of the main function.
Source Code
#include<iostream>
using namespace std;
int main()
{
cout<<"Hello World...!";
return 0;
}
Output
Hello World...!
To download raw file
Click Here