/*CLASSIFICATION OF CONSTANTS*/
* NUMERIC CONSTANT:- These are the constants that are formed by the combination of digits from 0to9. They may or may not have a decimal point in them. They may be preceded by +ve or -ve sign. Numeric constants are further of two types:-
A:- INTEGER CONSTANT:- Integer constants are the sequence of digits that are used in C program. Integer, octal integer and hexadecimal integer, are the three types of numeric constants.
Decimal integer may be preceded by +ve or -ve sign. you can use commas(,) etc.
Octal integer constants consist of sequence of digit from 0to7.
Hexadecimal integer are represented by the combination of 0to9 and character from AtoF.
B:-REAL CONSTANT:- It is used to represent the quantities that vary rapidly. Example:- distance, weight, height, and price.
It contains fractional part to accurately represent such quantities. Real constants are also called as float point cell.
They are further of two types:-
1) FRACTIONAL FORM
2) EXPONENTIAL FORM
![]() |
| sk |
a:- INTEGER CONSTANTb:-REAL CONSTANT
A:- INTEGER CONSTANT:- Integer constants are the sequence of digits that are used in C program. Integer, octal integer and hexadecimal integer, are the three types of numeric constants.
Decimal integer may be preceded by +ve or -ve sign. you can use commas(,) etc.
Octal integer constants consist of sequence of digit from 0to7.
Hexadecimal integer are represented by the combination of 0to9 and character from AtoF.
B:-REAL CONSTANT:- It is used to represent the quantities that vary rapidly. Example:- distance, weight, height, and price.
It contains fractional part to accurately represent such quantities. Real constants are also called as float point cell.
They are further of two types:-
1) FRACTIONAL FORM
2) EXPONENTIAL FORM
* CHARACTER CONSTANT:- These are used to express quantity like:- name, place, gender, etc. They can be a single character or a group of characters or backslash(\) character constant.
:-SINGLE CHARACTER CONSTANT:- A single character constant contains a single character. They are enclosed in single quotation make ('E'). It can be either a single alphabet, digit, or single symbol out of 'C' character cell and it must be enclosed l in single inverted commas.
:-STRING CHARACTER CONSTANT:- A group of character is called strings. These are enclosed with in double quotation make ("cat").
:-BACKSLASH CHARACTER CONSTANT:- In C language code some special character constant that are called escape sequences. They are used with other function of C.
Example:- \n=next line, \b=back space, \t=horizontal tab, \v=vertical tab.

No comments:
Post a Comment