+ 1
What is the output and explain this code in correct way ...
sizeof
5 odpowiedzi
+ 3
It's returning you the size value in BYTES.
+ 1
In pure C and with some compiler, undefined functions will be cast to type int (*)(...) so there will be no error and the size of what it is returned (which is just an integer uninitialized) is 4 as integers are 4 bytes like @Jamie said
And yes, @Jamie pinpointed two biiig errors
0
#include<studio.h>
main
{
int a;
a=sizeof( printed(""););
printf("%d",a);
}
0
why answer is 4 ?????
0
That code won't run, compiler error...
But 4 bytes is an int size (int size is *not* ever guaranteed). Memory addresses are 4 bytes IIRC on 32bit systems. Whatever code you had has been copied wrong though. I mean line 1 says "studio.h", and it degrades from there. No return or args for main? And ;); is meaningless.