Syntax

Its a simple code for printing Hello World that we learned in first post. 




1.     "#include<iostream>"this line is a Header File that helps us work with input and output that we used as cout.

2.     "using namespace std;"this lines means we can use names for objects and variables from the standard library.

3.     "int main(){ "this line is a simple example of function and any code inside this curly bracket( { ) will be executed.

4.     "cout<<"Hello World!" " cout is used with insertion operator (<<) followed by the message that you want as an output.

5.     "return 0;" its just gives a return value to your main function.

6.     "}" this is the pair of the bracket that we started its states the end of all the code that we write in main function.



Post a Comment

0 Comments