SO THE TERM CONSTANT REFERS TO THE VALUE OF A VARIABLE WHICH DO NOT CHANGE DURING THE EXECUTION OF PROGRAM.
IN C PROGRAMMING LANGUAGE CONSTANTS IS DIVIDED IN TO TWO TYPES. THEY ARE:
NUMERIC CONSTANT.
NON NUMERIC CONSTANT
NUMERIC CONSTANT:
NUMERIC CONSTANT CAN BE REPRESENTED THROUGH THE FIXED INTEGER NUMBER OR REAL NUMBER.
DONT WORRY I KNOW WHAT YOU ARE THINKING NOW I WILL TELL YOU WHAT IS INTEGER AND REAL CONSTANT.
OK NOW NUMERIC CONSTANT IS SUB DIVIDED IN TO TWO TYPES.THEY ARE:
INTEGER NUMBER.
REAL NUMBER.
INTEGER NUMBERS:
IT CAN BE REPRESENTED THROUGH THE WHOLE NUMBERS (0-9).
WE CAN REPRESENT OCTAL NUMBERS USING NUMBER (0-7).
HEXA DECIMAL CAN BE REPRESENTED BY USING THE NUMBERS 0-9 FOLLOWED BY A-F AND PROCEEDED WITH ox/OX.
REAL CONSTANT:
REAL NUMBERS IS ALSO KNOW AS FLOATING POINT NUMBERS.
IT IS USED TO REPRESENT VARYING MEASUREMENTS LIKE:
PRICE.
TEMPERATURE.
VOLTAGE.
ETC.
NON NUMERIC CONSTANT:
IT IS USED TO REPRESENT NON NUMBER CONSTANTS WHICH CONSISTS OF ALPHABETS AND STRINGS.
THEY ARE CALLED BY THE NAME CHARACTER CONSTANTS AND STRING CONSTANTS.
CHARACTER CONSTANTS:
IT CONTAINS ALPHABETS FROM THE ENGLISH LANGUAGE WHICH ARE ENCLOSED WITH SINGLE QUOTE.
STRING CONSTANT:
IT IS REPRESENTED BY MORE THAN ONE ALPHABETS FROM ENGLISH LANGUAGE WHICH ARE ENCLOSED WITH DOUBLE QUOTES ARE KNOWN AS SRRING CONSTANT.
No comments:
Post a Comment