Similar questions 3 more →
IP Addressing, Fragmentation & Address Resolution

Answer & solution
Official answer: C
Step through it (5 steps)
1. Two IPv4 interfaces are in the same subnet when bitwise AND of each address with the subnet mask yields the same network address. The first three octets are identical here, so only the last octet needs calculation.
2. The last mask octet 252 is binary 11111100. Thus the two low bits are host bits and each subnet spans four consecutive addresses, starting at multiples of four.
3. M has last octet 2=00000010; AND with 11111100 gives 0. Its network is 100.10.5.0/30, covering last octets 0 through 3.
4. N has 5=00000101 and P has 6=00000110. Masking either gives 4=00000100. Both belong to 100.10.5.4/30, covering 4 through 7.
5. Only N and P share a subnet, so C is correct. Comparing the first three octets alone would incorrectly assume a /24 mask; the supplied /30 mask is decisive.