S
sophia.agnes
Dear all,
why the following program is giving o/p as
sizeof(struct emp) = 0
#include<stdio.h>
#include<stdlib.h>
struct emp
{ };
int main(void)
{
printf("\n sizeof(struct emp) = %d", sizeof(struct emp));
puts ("");
return (EXIT_SUCCESS);
}
i have seen this same code giving o/p as 1 in other compilers
why the following program is giving o/p as
sizeof(struct emp) = 0
#include<stdio.h>
#include<stdlib.h>
struct emp
{ };
int main(void)
{
printf("\n sizeof(struct emp) = %d", sizeof(struct emp));
puts ("");
return (EXIT_SUCCESS);
}
i have seen this same code giving o/p as 1 in other compilers