#include <iostream>
using namespace std;
int main()
{
cout<<"Welcome to TutorialRide";
return 0;
}
/* First C++ Program */ | /*...*/ comments are used for the documentation to understand the code to others. These comments are ignored by the compiler. |
#include<iostream> | It is a preprocessor directive. It contains the contents of iostream header file in the program before compilation. This header file is required for input output statements. |
int/void | Integer (int) returns a value. In the above program it returns value 0. Void does not return a value so there is no need to write return keyword. |
main() | It is an entry point of all the function where program execution begins. |
Curly Braces {...} | It is used to group all statements together. |
std::cout | It is requried when we use #include If using namespace std is placed into the program then it does not required to write std:: throughout the code. Namespace std contains all the classes, objects and functions of the standard C++ library. |
"Welcome to TutorialRide" | The words in inverted commas are called a String. Each letter is called a character and series of characters that is grouped together is called a String. String always be put between inverted commas. |
<< | It is the insertion stream operator. This operator sends the content of variables on its right to the object on its left. In the above program, right operand is the string "Welcome to TutorialRide" and left operand is cout object. So it sends the string to the cout object and then cout object displays the string as a output on the screen. |