Guys what is the difference between declarations and definitions of varibles,functions, structures?
I understand
are examples of declarations and int c=4; is an initilisation but how does variable definition differ?
Same with structures
Code:
struct autopart
{
char id;
float price;
}
//is the structure declaration.What is the definition of a structure.
for functions
Code:
int sum2digits(int a,int b); //the prototype
lets say...
Code:
int sum2digits(int a, int b) //what is this line called?
{
return a+b;
}
what are the definitions and declarations.