C++ Hello World Program

c++ programming is high level programming language which is originate form c programming Language, C++ language is developed by Bjarne Stroustrup at AT & T Bell Laboratories in early 1980s. C++ Programing is used to write computer programs in two ways procedural programming and object- oriented programming . C Plus Plus programming is used to create Application software and system software with object oriented design. c++ programming has features of classes, objects and functions.

C++ Hello World Program

#include <iostream>

using namespace std;

int main()

{

cout << ” Hello World ” ;

return 0:

}

C++ Programming

Program Output

Hello world

C++ Hello World program

#include <iostream>

This is the first line of c++ program and this line starts with #, # is called a preprocessor directive. The compiler starts compiling c++ Programs from # symbol which is #include <iostream> in any C++ program. The #include directive tells the preprocessor to include the contents of another file in the program and iostream is the nameĀ  of the file that is to be included because iostream file helps to display output of c++ program .

using namespace std

C++ uses namespaces to organize the names of program entities,

int main()

This is main body of C++ Program, main() may have many other group statements of a C++ Program, which statements are written inside main function perform the user task, this is main function of c++ program. Int stands for Integer, int main return Integer value to the main function.

cout << ” Hello World ” ;

This line starts from cout <<, it is used to display the message on computer screen. “Hello word” is a string it is terminated by semicolon ( ; ) and string is written inside pair of double quotes .

Leave a comment