C++ Programming Language Tutorial | Writing first C++ program : Hello World example | GeeksforGeeks

C++ Programming Language Tutorial | Writing first C++ program : Hello World example | GeeksforGeeks


Hi and welcome to GeeksforGeeks, in this tutorial
we will learn how to write a simple Hello World program.
In C++, a simple comment line begins with // double forward slash.
And here, we are writing our first C++ program. After this, we have to include some libraries
which will help us write the program. The #include directive tells the compiler to include
a file. For a simple Hello world code, we just need input output stream library. So,
we includeThen, we will start the main function of the
return type integer. Execution of every C++ program begins with the main() function, no
matter where the function is located in the program. So, every C++ program must have a
main() function. Then, we start writing the function by a opening
curly bracket and to end a function we have a closing bracket.
If we need to print something on we use the std::cout command. This line tells the compiler
to display the message “Hello World” on the screen. The std::cout is used to identify
the standard character output device which is usually the desktop screen. Everything
followed by the character “

4 thoughts to “C++ Programming Language Tutorial | Writing first C++ program : Hello World example | GeeksforGeeks”

  1. This gentleman is very smooth and clear with his explanations. He could lead an IT class in programming 1000 and all new students would register for his class first. Especially me! Great job Parikshit.

Leave a Reply

Your email address will not be published. Required fields are marked *