Basic structure of C++ program:
A program in C++ consists of the following parts:
1) Preprocessor directive
2) Main() function
3) Body of program(C++ statements)
preprocessor directive
main()
{
C++ statements;
}
Example:
#include<iostream>
using namespace std;
int main()
{
cout<<"Hello world !";
return 0;
}
0 Comments