I know there has been awfully lot debates over the differences and meanings of Declaration and Definition but I still can't understand where and when should we use Declaration.
Declaration
A variable declaration provides assurance to the compiler that there exists a variable with the given type and name so that the compiler can proceed for further compilation without requiring the complete detail about the variable. A variable definition has its meaning at the time of compilation only, the compiler needs actual variable definition at the time of linking the program.
Definition
A variable definition tells the compiler where and how much storage to create for the variable. A variable definition specifies a data type and contains a list of one or more variables of that type as follows −
EDIT 1: Is declaration necessary at all times, if not, when it is necessary to use? Does definition do enough job as it does in other languages like Java, JS
EDIT 2: I have already said that there have been answers to their differences, I have problems about understanding their usages.