Add

Showing posts with label Example program. Show all posts
Showing posts with label Example program. Show all posts

Friday, November 16, 2018

Example program and Rules for writing a program


Example program


•#include<stdio.h>
•#include<conio.h>
•void main()
•{
•  printf”Hellow world";
•getch();
•}
•


Rules for writing a program


•All the names of the variables and other words should be in lower case

•The first function of the program should be main.
•All the program should be in medium braces {}
•After each instruction of the program we should put semicolon but no semi colon after main, preprocessor directive and braces because they are a part of program but not executed like other instructions.