Information about literals
Answers
Answered by
1
Greetings,
Your answer is typed below ^
_____________________________________________________________
Literal : Any value which remains constant throughout the program.
TYPES OF LITERALS:-
a) Integer literal : Any positive or negative number and zero which are declared in the program are called integer literals
i) Decimal integer literal : These are integer literals in decimal number system. i.e; these are numbers in base 10. They are from digits 0 - 9.
ii) Octal literals : These are the literals in octal number system. i.e: the base of these numbers is *. They are formed from digits 0 - 7.
iii) Hexadecimal literals : These are the literals in the hexadecimal number system. i.e; the base of the numbers is 16.
b) Floating literals : These are the decimal integers with a fractional component. i.e; these numbers have a decimal point.
c) Boolean literals : A Boolean value can either be true or false.
d) Character literals : A character is a distinctive mark or symbol, alphabets (small or capital) or even digits. This value is represented by enclosing it in single quotes. e.g : 'u' .
e) String literals : A string is a set of characters enclosed in double quotes. e.g : "#a_nimal ";
_____________________________________________________________
That's all I have to say about literals my friend ;)
Your answer is typed below ^
_____________________________________________________________
Literal : Any value which remains constant throughout the program.
TYPES OF LITERALS:-
a) Integer literal : Any positive or negative number and zero which are declared in the program are called integer literals
i) Decimal integer literal : These are integer literals in decimal number system. i.e; these are numbers in base 10. They are from digits 0 - 9.
ii) Octal literals : These are the literals in octal number system. i.e: the base of these numbers is *. They are formed from digits 0 - 7.
iii) Hexadecimal literals : These are the literals in the hexadecimal number system. i.e; the base of the numbers is 16.
b) Floating literals : These are the decimal integers with a fractional component. i.e; these numbers have a decimal point.
c) Boolean literals : A Boolean value can either be true or false.
d) Character literals : A character is a distinctive mark or symbol, alphabets (small or capital) or even digits. This value is represented by enclosing it in single quotes. e.g : 'u' .
e) String literals : A string is a set of characters enclosed in double quotes. e.g : "#a_nimal ";
_____________________________________________________________
That's all I have to say about literals my friend ;)
Similar questions