Solution:In this, size of short int = 4 bytes
S * p = & B [4]; // p is having the address of B [4]
S * q = & B [5]; // q is having the address of B [5]
suppose B[4] address is 116 [take base address as 100].
So B [5] will come as 120
q – p will be = (address of B[5] – address of B[4])
q – p = (120 – 116)/4 = 4/4 = 1
Also M is equal to q – p (given in the question)
So M = 1
Now, we have to find the value of N =
((int) & (p → c)) – ((int) p),
Here, c is a char and it is type casted to int ((int) & (P
→ C)) – ((int) p // address difference between p's
starting address and c address will be of 2 bytes only.
So N becomes 2
∴ (M, N) = (1, 2)