C variable declarationPritesh
What is Declaration ?
- To Declare is nothing but to represent a variable.
- Only Variable name and its Data type is Represented in Declaration.
Facts about Declaration :
- Memory is neither allocated to Variable nor space is Reserved after declaration.
- Declaration is just used for Identification of Data Type.
- Re-Declaration of variable will cause compile Error.
int ivar; int ivar = 10;
It will cause compile error. We cannot re-declare variable.
- We cannot use variable inside program expression or in program statements without declaring.
- Declaring a variable just give rough idea to compiler that there is something which is of type “<Data Type Specified>” and will be used in the program.
Example Of Declaration :