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 void main () in c?
What is string function c?
Explain how many levels deep can include files be nested?
Explain what is wrong with this program statement?
What are the types of bitwise operator?
Is a house a mass structure?
What is function what are the types of function?
What is an identifier?
Write a code to generate a series where the next element is the sum of last k terms.
Why do we write return 0 in c?
What functions are used in dynamic memory allocation in c?
I need a sort of an approximate strcmp routine?
Write a program in c to replace any vowel in a string with z?
What are the difference between a free-standing and a hosted environment?
What are the advantages of c preprocessor?