Main | Registration | Login | RSSThursday, 2024-04-25, 7:41 AM

PiEcE oF InFoRmAtIoNs

Site menu
Search
Statistics

Total online: 1
Guests: 1
Users: 0

Structure of a Simple C program

<#include directive>
<#define directive>
main()
{
       <variable declaration section>
       Statements
       …
}

A. #include directive – "contains information needed by the program to ensure the correct operation of Turbo C’s standard library functions”
Example: #include <stdio.h>

B. #define directive – "used to shorten the keywords in the program”
Example: #define g gotoxy

C. Variable declaration section – "it is the place where you declare your variable”

D. Body of the program – " start by typing main() and the { and } (open and close braces). All statements should be written inside the { and } braces”


NOTE: Turbo C is a case sensitive program, therefore use lowercase letters only.


Commonly used include files in C language

1. alloc.h – declares memory management functions

2. conio.h – declares various functions used in calling IBM-PC ROM BIOS

3. ctype.h – contains information used by the classification and character conversion macros.

4. math.h – declares prototype for the math functions.

5. stdio.h – defines types and macros needed for standard I/O.

6. string.h – declares several string manipulation and memory manipulation routines.

Login form
Calendar
«  April 2024  »
SuMoTuWeThFrSa
 123456
78910111213
14151617181920
21222324252627
282930
Site friends
CLICK BELOW THE SITE YOU WANT TO GO:

Create your own site

YAHOO Mail

FACEBOOK

GOOGLE

FRIENDSTER

Our poll
Rate my site
Total of answers: 40

Copyright MyCorp © 2024
Make a free website with uCoz