Definition is the place where variable is created (allocated storage).
Declaration is a place where nature (type) of variable is stated, but no storage is allocated.
Initialization means assigning a value to the variable.
Variables can be declared many times, but defined only once. Memory space is not allocated for a variable while declaration. It happens only on variable definition.
Variable declaration
syntax
data_type variable_name;
example
int a, b, c;
char flag;
Variable initialization
syntax
data_type variable_name = value;
example
int a = 50;
char flag = 't';
About goddem
Templatesyard is a blogger resources site is a provider of high quality blogger template with premium looking layout and robust design. The main mission of templatesyard is to provide the best quality blogger templates which are professionally designed and perfectlly seo optimized to deliver best result for your blog.
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment