Rules for Creating C++ Programs

Rules for C++ Programs :-

  1. C++ program should be in proper sequence.
  2. Always C++ programs starts with main() function.
  3. The Body of a function is surrounded by curly brackets.
  4. C++ Program should be included the header files.
  5. Variable Declaration should by properly.
  6. The program statements should be properly placed.
  7. Every C++ program statement should be terminated by semicolon.

For Example :-

#include <iostream.h>
void main()
{
   cout<< "welcome Sharad";
}

Ebook Download
View all
Learn
View all