After going through lots of stuff about declaration and definition,in a nutshell I understand that the difference is in the memory allocation.
In definition yes and in declaration no memory is allocated.
Fine ,Is there any process that shows that yes
int a; //which is a definition
allocates a 4 bytes memory by the name a.
gcc generates an assembly code ,but seing that assembly I don't find any presence of variable a in the assembly code generated by gcc.
Like in assembly it is supposed to be something like
a dword ?
Well above code is masm code. So something similar to above.
But there is no trace of int a in the generated assembly,then how can we say it as a definition.
Or is there any way to find out the offset given to int a,without using a single second statement .(basically via assembly code).
Please rectify me if I am going wrong.
Cheers!!