What types of variable declaration is used in program.
Q15. What type of variable declaration the following program is using?
:
:
int main()
{
int area, length=10,width=12,perimeter;
area=length*width;
perimeter=2*(length+width);
:
:
}
Ans. The above program is using two types of variable declarations:
- Simple definition or uninitialized variables for variables area and perimeter.
- Initialized variables fro variable length and width.