Character Set
A Character set can be define as collection of the following -:
(a-) ALPHABET - Lowercase [a-z] and Uppercase [A-Z]
(b-) DIGIT- [0-9]
(C-) SPECIAL SYMBOL -[@,#,:,<,>,!;]
Reserved Words [keywords]
1- They are those words which are pre-defined and have some specific meaning .such words can be used in a program only for their intended purpose.
2- Reserved words are always be written in lowercase letter.
3- Some of the common example of keywords are as follow-:
void,int,switch,for,else,if,continue,break,etc..
There are total 32 keywords available in C language.
auto, else , long , switch, break , enum , register , typedef, case, extern, return, union, char, float short, unsigned, const, for, signed, void, continue, goto, sizeof, volatile, default, if, static, while
do, int, struct, double.
do, int, struct, double.
Identifier
1- An identifier is a user define word which is used in a program to provide a name to memory location ,variable,array,function,structure,union,file,etc.
2- Though an identifier is a user define word ,so to avoid the problem regarding its naming there are some rules which the user have to follow while declaring an identifier.
3- The possible rule for declaring an identifier are as follow-:
(a-) An identifier should always will begin with alphabet or,underscore.
(b-)Valid character to form an identifier are as follow-:
alphabet-: lowercase [a-z]
uppercase [A-Z]
uppercase [A-Z]
digit-:[0-9]
special character-:[ _ ]
(c-) Reserved words when written in lower case letter cannot be used as an identifier.
example:- int int=10; invalid
int iNt=10; valid
Variable It is an entity whose value may change during the entire execution of program.
Constant It is an entity such as actual values ,facts or figures which are directly written in a program in order to participate into the calculation to provide a meaningful result. The value of constant can not change during the entire execuation of program.
Comments are like helping text in your C program and they are ignored by the compiler.
•They start with /* and terminate with the characters */
•Example:-
printf(“Hello World”); /*Display message*/.
ads
Comments
•They start with /* and terminate with the characters */
•Example:-
printf(“Hello World”); /*Display message*/.
Strings
It is a sequence of 0 to 255 alpha-numeric character written by enclosing them within a pair of double quotes.A null character denoted "\o" ,having ASCII value 0 is automatically attached at the end of every string by the compiler to represent end of the string. ex- "ram".
DATA TYPES
Data types in C refer to an extensive system used for declaring variables or functions of different types.The type of a variable determines how much space it occupies in storage and how the bit pattern stored is interpreted.
•Example:-
int abc_1; /* abc_1 is variable name which will store integer data*/
float abc_2; /* abc_2 is variable name which will store float data*/
ads
how is it..
ReplyDelete