Skip to content
doubtly

1 answer

Best answer

There are two differences between a declaration and a definition: In the definition of a variable space is reserved for the variable and some initial value is given to it, whereas a declaration only identifies the type of the variable. Thus definition is the place where the variable is created or assigned storage, whereas declaration refers to places where the nature of the variable is stated but no storage is allocated. Secondly, redefinition is an error, whereas, redeclaration is not an error.
Doubtly · 11 Jun 2022 Report
Was this answer helpful?

Your answer

Log in or create a free account to answer this question.