Consider the following C-code fragment running on a 32-bit x86 machine:

typedef struct

{

union

{

unsigned char a;

unsigned short b;

}

unsigned char c;

}S;

S B[10];

S *p = &B[4];

S *q = &B[5];

p → U.b = 0x1234;

/* structure S takes 32-bits */

If M is the value of q-p and N is the value of ((int) & (p→ c))-((int)p), then (M, N) is

1
(1, 1)
2
(3, 2)
3
(1, 2)
4
(4, 4)

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation