<<<...C KEYWORDS...>>>
Keywords are the words whose meaning has already been expained to the c compiler.
There are only 32 keywords available in C.
The keywords should not be used as variable names. However,some C compilers allows
you to construct variable names that exactly resemble the keywords.
Compiler vendors provide more keywords apart from the ones given in following figure.
Though it has been suggested by the ANSI committee that every such compiler-specific
keyword should be precede by two underscore (as in_asm), not every vendor follows
this rule.
<<<...THE FIRSTC PROGRAM...>>>
Once armed with the knowledge of variables, constants and keywords, the next logical
step is to combine them to form instructions.However,instead of this, we would write
our first C program now.Once we have dome that would see in detail the instructions that
it made use of. The program is very simple.It calculates simple intesest for a set
of values representing principal,number of years and rate of interest.
/*Calculation of simple interest*/
#include<stdio.h>
int main()
{
int p,n;
float r,si;
p=1000;
n =3;
r= 8.5;
/*formula for simple interest*/
si= p*n*r/100;
return 0;
}
Let us now understand this program in detail.
next blog.....
0 Comments