Question: what is the difference between the declaration and definition of a variable?
Answer: you can define a variable only one time but you can declare it as many time you want. For a variable, declaration means just stating its data type along with giving it name for memory allocation; while definition means giving the value of that variable. declaration is giving a prototype like simply a name .