Example: -
#include<iostream>
Using namespace std;
int main() {
court<<"Hello coder" ;
return 0;
}
Example explained:-
Line 1:-#include<iostream> is a header file library
Line 2:-Using namespace std means that we can use names for objects and variables from the standard library.
- Line 3:- int main ( ). This is called a function. Any code inside its curly brackets{ } will be executed.
Line 4:-cout(pronounced "see-out") is an object used with the insertion operator (<<)to output/print text.
- Line 5:- return 0; ends the main function.
Line 6:-Don't forget to add the closing curly bracket }.