What is the difference between declaration and definition of a variable?
Answer:
-Declaration only identifies the data type of a variable whereas definition causes the space to be reserved for the variable.
-Thus, declaration in a place where the nature of the variable is stated but no storage is allocated whereas definition is the place where the variable is created or assigned storage.