Wednesday, 1 April 2015

2.3 C First Program

 C First Program


1.   Every C Program Should have exactly one main function
2.   C Program Execution Always Starts from main.
3.   Execution of C Program begins at Opening brace of function and ends at closing brace of the function
4.   Generally all statements in c are written in Lowercase Letters.
5.   Uppercase Letters are used for Symbolic names,output strings and messages
6.   Every C statement must ends with semicolon
7.   All variables must be declared with respective data types before using .
8.   C is free form-Language
9.   Comments can be inserted anywhere in C Program , but nested comments are not supported by C .
10. Braces are Generally Used for the Grouping of statements




Sample C Program :


//C hello world example
#include <stdio.h>

int
 main()
  {
   printf("Hello world");
   return 0;

   }