top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

Why does the size of a blank structure is one?

+3 votes
Why does the size of a blank structure is one?
posted Nov 10, 2014 by Ganesh

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button
please can you expalin the question with example?
#include <stdio.h>
struct x{
void main()
      printf("%d\n",sizeof(struct x));
output : 0
so wanto check your case.
I must say these things are specific to the compiler and language.  So u must not get into the intricate of these thing. Specially if u don't need it.

Similar Questions
+6 votes

Structure padding is useful for increasing processing speed for input/output, correct?
My question is i have tested structure padding on 32 and 64 bit system but both the place padding is done to achieve 4 Bytes jump, So why not 8 byte for 64 Bit system?

Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.