What is the difference between variable declaration and variable definition in C?

C Programming Language >   Variable in C Language >   Variable Introduction in C  

Short Question

8855


Answer:

  • Variable declaration tells the compiler about data type and size of the variable. Whereas, variable definition allocates memory to the variable
  • Variable can be declared many times in a program. But, definition can happen only one time for a variable in a program.
  • Variable declaration is for assignment of properties and identification to a variable. Whereas, variable definition is for assignments of storage space to a variable


This Particular section is dedicated to Question & Answer only. If you want learn more about C Programming Language. Then you can visit below links to get more depth on this subject.




Join Our telegram group to ask Questions

Click below button to join our groups.