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?Code:int c; int d;
Same with structures
//is the structure declaration.What is the definition of a structure.Code:struct autopart { char id; float price; }
for functions
lets say...Code:int sum2digits(int a,int b); //the prototype
what are the definitions and declarations.Code:int sum2digits(int a, int b) //what is this line called? { return a+b; }



LinkBack URL
About LinkBacks



