#include <stdio.h>
struct A {
};
int main(void)
{
printf("%zu\n", sizeof(struct A));
return 0;
}
Output of this after gcc a.c -oac && ./ac is 0, g++ a.c -oac && ./ac will output 1...
See gnu cc manual, chapter 5.15.
My personal blog.
#include <stdio.h>
struct A {
};
int main(void)
{
printf("%zu\n", sizeof(struct A));
return 0;
}
0 comments:
Post a Comment