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 / harshit

there is no practical such as declaration its in theory only
the only practical application is :

int a; //defination
a=10; //intialization

this is a normal thing we do,,,now

somemethod()
{
int a;//defination
}


main()
{
extern int a;//declaration
a=10//intialization
}

here we declare that there is a variable "a" somewhere
n this is the only use of declaration ...
to best of my knowledge...
plz suggest if someone kno better

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where define directive used?

1087


write a program to display all prime numbers

1962


What is meant by type casting?

1052


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)

2121


How can I get back to the interactive keyboard if stdin is redirected?

1188


Why do we use pointer to pointer in c?

1082


How do I use void main?

1089


Why do we use c for the speed of light?

1200


What is array in C

1153


Can we increase size of array in c?

964


What is the code in while loop that returns the output of given code?

1985


Why is void main used?

1094


diff between exptected result and requirement?

2052


what is the significance of static storage class specifier?

2254


Which of these functions is safer to use : fgets(), gets()? Why?

1094