CoolInterview.com - World's Largest Collection of Interview Questions
Send Free SMS
 Interview Questions  
 Our Services  


INTERVIEW QUESTIONS LANGUAGES C DETAILS
Question :
What is the difference between declaring a variable and defining a variable?
Category C Interview Questions
Rating (2.8) By 6 users
Added on 10/22/2004
Views 3585
Rate it!
Answers:

Declaring a variable means describing its type to the compiler but not allocating any space for it. Defining a variable means declaring it and also allocating space to hold the variable. You can also initialize a variable at the time it is defined.



int a;//declaration

int a=10;//intialisation

int a;
a=10;//defnition



 Posted by: NAVEED    

Contact NAVEED  Contact NAVEED


If you have the better answer, then send it to us. We will display your answer after the approval.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification  Enter the above shown code:*
Inform me about updated answers to this question

   
Related Questions
View Answer
Can static variables be declared in a header file?
View Answer
What is the benefit of using const for declaring constants?
View Answer
What is the easiest sorting method to use?
View Answer
What is the quickest sorting method to use?
View Answer
How can I sort things that are too large to bring into memory?
View Answer
What is the easiest searching method to use?
View Answer
What is the quickest searching method to use?
View Answer
What is hashing?
View Answer
How can I sort a linked list?
View Answer
How can I search for data in a linked list?
View Answer

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when better answer is posted!
Email:

View ALL C Interview Questions

User Options
Sponsored Links


Copyright ©2003-2010 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions
Page URL: http://www.coolinterview.com/interview/1051/default.asp?cachecommand=bypass


Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Free SMS | Dedicated Servers | Joke of the Day

0.62