GeeksforGeeks » Interview Questions

VeriFone Interview Question (Fresher) about CPuzzles

(3 posts)

Tags:

  1. Kapil
    guest
    Posted 1 year ago #

    struct
    {
      char a[3];
      int b;
    }x;
    

    What is sizeof(x)?

  2. natasha
    guest
    Posted 1 year ago #

    5

  3. Venki
    Moderator
    Posted 1 year ago #

    No. It depends on architecture. On 32 architecture with strict alignment restrictions the size will be 8 bytes.


Reply

You must log in to post.

RSS feed for this topic