Pps Unit-1 Lesson Variables and Constants (1)
Pps Unit-1 Lesson Variables and Constants (1)
Pps Unit-1 Lesson Variables and Constants (1)
CONSTANTS
IN C
Variable:
Valid :
Mark,Sum1,tot_value,Delhi
Invalid :
Its value remains the same during the entire execution of the program.
Constants are also called literals.
Constants can be any of the data types.
It is considered best practice to define constants using only upper-
case names.
FIG :TYPES OF CONSTANTS
Types of c constants:
Types of c constants:
1.Integer constants
2.Real constants
3.Character constants
4.String constants
Integer constants:
Syntax :
Const datatype nameofconstant = value;