Main | Registration | Login | RSSTuesday, 2025-01-28, 6:04 AM

PiEcE oF InFoRmAtIoNs

Site menu
Search
Statistics

Total online: 3
Guests: 3
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
«  January 2025  »
SuMoTuWeThFrSa
   1234
567891011
12131415161718
19202122232425
262728293031
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: 41

Copyright MyCorp © 2025
Make a free website with uCoz