Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

How does sizeof know array size?

1131


Who invented b language?

1427


What is the main difference between calloc () and malloc ()?

1166


Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

1103


What is the difference between exit() and _exit() function?

1054


What is queue in c?

1110


What are the 5 elements of structure?

1084


How can a number be converted to a string?

1344


How can I access an I o board directly?

1094


What are high level languages like C and FORTRAN also known as?

1177


Explain the array representation of a binary tree in C.

1238


what do you mean by enumeration constant?

1018


What are header files in c programming?

1141


Can I initialize unions?

1051


I have seen function declarations that look like this

1052