Hssreporter - Com - Ch6-Introduction To Programming
Hssreporter - Com - Ch6-Introduction To Programming
comments
Comments increase the readability of a program and helps in future program
modification.
It is not considered as the part of program and cannot be executed
Comments
Variable Initialisation:
Supplying the initial value to a variable at the time of declaration.
(staticinitialisation)
eg: int n =5 ;
Supplying the initial value to a variable during execution(dynamic
initialisation)
eg: int sum=a+b; or cin>>a;
const Keyword
The const keyword specifies that the value of a variable does not change
throughout the program.
syntax :const data type variable_ name = value;
Eg:constfloat pi=3.14;
Type modifier
o The keywords signed,unsigned,short and long are type modifiers.
o A type modifier changes the meaning of the base data type to produce a new
data type.