A SIMPLE SAMPLE OF C++ PROGRAM


A SIMPLE C++ PROGRAM.

Consider the following c++ program

#include <iostream>
using namespace std;
int main ( )
{
  cout << " The sum of 4 and 7 is  =" << 11<<endl;
return o;
}

Description of this program

The symbol # is called preprocessor directives iostream is header file.
The body of the c++ program  is

#include <iostream>
using namespace std;
int main ( )
{

return 0;
}

in c++ program every statement end is with semicolon ;