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

As i know.....
Definition is one which allocates memory.
Ex: int x;

Declaration never occupy any memory space.
Ex:Function prototype declarations such as....
int func(int,int);

Initialization: If any variable assigned with some value at
time definition itself is called initialization.
Ex:int x=0;

Is This Answer Correct ?    35 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the features of c languages?

1107


Describe the steps to insert data into a singly linked list.

1077


What is the best way to comment out a section of code that contains comments?

1346


Explain what is output redirection?

1197


Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?

3522


What are types of structure?

1121


What is the purpose of realloc()?

1148


Explain how can you avoid including a header more than once?

1093


What are static variables in c?

1084


What are the benefits of organizational structure?

1031


Can the size of an array be declared at runtime?

1088


What is the difference between text and binary modes?

1197


What are the data types present in c?

1166


Is c easier than java?

1083


What are global variables and how do you declare them?

1102