consider the following struct
what is the result of calling sizeof(somevariable) ? please explainCode:struct something { int i; struct something *somepointer; } somevariable;
consider the following struct
what is the result of calling sizeof(somevariable) ? please explainCode:struct something { int i; struct something *somepointer; } somevariable;
8 bytes ?? (Assuming its a 32 bit computer and int means (long) )
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*
The result will be sizeof somevariable. As Dave pointed out it depends. Since not every compiler will use the same size for int and not every compiler will use the same size of a pointer to a struct.
>>what is the result of calling sizeof(somevariable) ?
Write your own program to answer that question, you shouldn't expect others to do that for you.
>>explain
Sounds like a homework question... Have fun working it out
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
got it...
thanks to all