InterviewSolution
| 1. |
What Is The Difference Between Declaring A Variable And Defining A Variable? |
|
Answer» Declaration is done to tell COMPILER the data type of the variable, and it INHERENTLY meant that somewhere in this scope, this variable is DEFINED or will be defined. And defining a variable MEANS to allocate SPACE for that variable and register it in the stack memory. For example: Declaration is done to tell compiler the data type of the variable, and it inherently meant that somewhere in this scope, this variable is defined or will be defined. And defining a variable means to allocate space for that variable and register it in the stack memory. For example: |
|