C First Program

In every programming Language we makes one Program Called Hello World.Today I am telling You that How make Your first program in C.
Before Making Your First Pogram You needs to Get some Tips:-
C Programming Introduction : Tips-
  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>
 
void main()

{

  printf("Hello world");

  return 0;
}


Description:-

-In First line #include<stdio.h>  is used to include library function stdio.h in program which has some predefined functions in library eg-printf is function defined in 
library function stdio.h

-Second line void main() describe the type of data remember that every function starts with main() function.
-Third line printf("Hello world") prints the Hello World in output.
C First Program  C First Program Reviewed by ANAND PANDEY on 6:24:00 AM Rating: 5

No comments:

Created By Anand Pandey. Powered by Blogger.