what is the difference between declaration ,defenetion and
initialization of a variable?

Answer Posted / shabeer v c

A good example to illustrate this Question ges like this:

Whenever we apply for a job the company declares that we
have been selected. Similarly we declare a variable like

int emp;
(here emp behaves as an employee).

Then he will be assigned with a initial salary which
will be incremented in course of time period or on
experience basis.
Similarly the variable int is assigned a initial
value.
i.e int emp=20;
(value can be changed in between program)

The employee is now identified by his post, which can
define his status in the company.
Same way the variable is also defined in the
program.
ie. int emp;

Is This Answer Correct ?    16 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a lookup table in c?

616


What is c method?

524


write a c program for swapping two strings using pointer

2076


What is scope and lifetime of a variable in c?

564


What is the meaning of 2d in c?

598






What is variables in c?

596


What is indirection?

637


When should the const modifier be used?

648


A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler

614


Is register a keyword in c?

621


Mention four important string handling functions in c languages .

615


can we have joblib in a proc ?

1643


What are the 4 types of organizational structures?

613


What is difference between main and void main?

613


In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)

1620