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
Where define directive used?
write a program to display all prime numbers
What is meant by type casting?
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)
How can I get back to the interactive keyboard if stdin is redirected?
Why do we use pointer to pointer in c?
How do I use void main?
Why do we use c for the speed of light?
What is array in C
Can we increase size of array in c?
What is the code in while loop that returns the output of given code?
Why is void main used?
diff between exptected result and requirement?
what is the significance of static storage class specifier?
Which of these functions is safer to use : fgets(), gets()? Why?