Monday, 14 May 2012

Difference between Definition and declaration?

Definition: It indicates the type and name of the variable or memory location to the compiler. So, compiler reserves memory space and name for the variable or function.

Declaration: It indicates initializing the values,addition of modifier, specifier etc. to the variable.

Declaring a variable without defining is illegal. It gives compile error.

1 comment: