define constant also elaborate types of constant
Answers
Hi there!
Constant are fixed values that do not change during the execution of a program.
There are 6 date types of data namely:
1. Integer.
2. Real.
3. Double precision
4. Complex
5. Logical.
6. Character.
1. Integer : An integer refers to a sequence of digits. There are three types of constants, namely, decimal integer, octal integer, and hexadecimal.
2. Real : It is used to represent qualities that are continuous, i.e distance , temperature, etc
3. Double Precision: It is a processor approximation to the real value.
4. Complex type: It is a processor approximation to the value of a complex number.
5. Logical type: A logical datum may assume only the values of true and falsies.
6. Character Type: A character datum is a string of characters. This string may consists of any character capable of representation in the processor.
Hope it helps u!