Constants are those data item whose value will not change at the time of program execution.
Basically there are four type of constant such as:- Character Constant
- String Constant
- Integer Constant
- Floating Point Constant
Character constants are alphabets.The length of character may be one or than one. Write all Characters are inside the single quote. example: 'a', 'az'
String constants are group of one or more characters. Write all string constant inside double quote (" "). Example:("a"), ("Shailu").
Integer constant represent the integer numbers , which combination of numbers between 0 to 9.
Floating point constant represent the floating numbers such as decimal numbers (2.33 , 44.56).
Special constant
Special constants are Symbolic constant. It is represented by any symbol or a name. It must define before use it , so for defining Define keyword is used. Example: #define AB6.33D
No comments:
Post a Comment