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
main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }
about c language
When a c file is executed there are many files that are automatically opened what are they files?
What are the types of type specifiers?
is it possible to create your own header files?
What is else if ladder?
How is a structure member accessed?
What are the types of data types and explain?
Why do we write return 0 in c?
What is the explanation for the dangling pointer in c?
What are pointers? Why are they used?
How important is structure in life?
How are Structure passing and returning implemented by the complier?
Is exit(status) truly equivalent to returning the same status from main?
How can I insert or delete a line (or record) in the middle of a file?