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

What is the difference between the = symbol and == symbol?

808


What are volatile variables in c?

693


Explain how can I make sure that my program is the only one accessing a file?

863


What is static and volatile in c?

977


Compare array data type to pointer data type

803


What are the general description for loop statement and available loop types in c?

894


Do array subscripts always start with zero?

993


Explain what are multibyte characters?

856


Why is c still so popular?

788


What are the different types of errors?

827


Why we not create function inside function.

1951


Are pointers integer?

750


What does nil mean in c?

885


Was 2000 a leap year?

822


How can my program discover the complete pathname to the executable from which it was invoked?

844