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 / kantilal

the diff b/w defination and declaration is
defination is allocating memory to the variable
ddeclaration is telling what type of variable it is and not
allocating memory for it

float y is defination as compiler allcates memory for it
if you give as extern float y it is declaration

Is This Answer Correct ?    30 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is string length in c?

602


Describe the modifier in c?

597


my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?

1111


List the difference between a While & Do While loops?

629


Explain what does it mean when a pointer is used in an if statement?

613






List the difference between a 'copy constructor' and a 'assignment operator' in C?

635


Is using exit() the same as using return?

669


Which control loop is recommended if you have to execute set of statements for fixed number of times?

805


Can a local variable be volatile in c?

573


In C language what is a 'dangling pointer'?

632


What is dynamic dispatch in c++?

552


When do we get logical errors?

633


How does sizeof know array size?

618


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

603


What functions are in conio h?

652