Sunday, November 21, 2010

Character set for C

Well, I know you are very eager to learn more as you already know the process in last post for making a program, now theoretically i will explain how a program made-



Source Code:- The code we type/write in C language.

Compile:- This is a term to change source code to machinery language and follow the instruction which we asked to computer for. it can be called interpreter.

Object Code:- After compiling the program, the output called object code.

Now ! come to the topic for character set of C language is-

1- Alphabet- A to Z, a to z.
2- Digits- 0 to 9.
3- Special symbols- ~ ' ! @ # % ^ & * () _ - + = | \ {} [] : ; " ' <> , . ? /



Constants- kindly go through with below mentioned fig.





1st- Integer- I think you are well aware about Integer, here in C are few rules for integer value-

- It should be at least one digit, no decimal point, no comma, no blank space.
- unsigned is assumed as positive integer.
- The range for 16 bit compiler for a integer is -32768 to 32767.

for example:-
main ()
{
int a= 12; /* int a is an unsigned integer*/
-------
--------
}

2nd- Real Constants- It also called floats, rules are mentioned below-

- must have a decimal point in a digit and no commas or blank-space allowed.



Example:-

main()
{
float b=1.2e-5;
float a=1.2;
--------------
-------------
------------
}

Now remaining chapter will explain in next post so till now keep reading........!

No comments:

Post a Comment