Declaration provides an identify of a variable to the compiler, saying “Hey, there is a variable with certain type here.”
Definition creates a memory space for the variable, which is used to store the data.
The differences are:
1. Declaration does not create memory space but definition does.
2. Same variable may have multiple declaration(external variable), but it can have only one definition.
We can make a declaration and definition at one time, like