Thursday, September 11, 2008

Learnings Of The Week

by:Steffany Queen P. Bigoy
I also learn about using the Turbo TC.

Structure of a simple C program

#include#define directivemain(){variable declaration section;____________________________________________}
#include directive – contains information needed by the program to ensure the correct operation of C’s Standard library functions.#define directive – used to shorten the keywords in the program.Variable declaration section – it is the place where you declare your variables.Body of the program – start by typing main() and the { and }. All statements should be written inside the braces.

C is a case sensitive program, therefore use lowercase letters only.
Commonly used include files in C language.
nalloc.h – declares memory management functions.nconio.h – declares various functions used in calling IBM-PC ROM BIOS.nctype.h – contains information used by the calssification and character convertion macros.nmath.h – declares prototype for the math functions.nstdio.h – defines types and macros needed for standard I/O.nstring.h – declares several string manipulation and memory manipulation routines.

Important Symbols
\n – is a line char used to move the cursor to the next line‘ ‘ – single quote is used for single character / letter.“ “ – double quote is used for two or more character{ - open curly brace signifies begin} – close curly brace signifies endn& - address of operator* - indirection operator / pointer

No comments: