wat is the difference between a definition and declaration?
float y;---it looks like a declaration..but it s a
definition.how?someone explain
Answer Posted / dally
defination is allocating memory to the variable.
but declaration is telling what type of variable it is and
not allocating memory for it.
Ex.int i;
extern int b;
here int i is definition because variable of value is
allocated in memory.
but variable b declared as int variable but memory is not
allocated for this.
float y is defination as compiler allcates memory for it
if you give as extern float y it is declaration
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is the difference between strcpy() and memcpy() function in c programming?
Difference between malloc() and calloc() function?
Why isnt any of this standardized in c?
Explain function?
What is conio h in c?
if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0
What is an lvalue?
How can I check whether a file exists? I want to warn the user if a requested input file is missing.
What are pointers really good for, anyway?
What are the keywords in c?
ATM machine and railway reservation class/object diagram
What is a substring in c?
What happens if a header file is included twice?
Explain what does the format %10.2 mean when included in a printf statement?
What does & mean in scanf?