The explanation for this question is quite SIMPLE:
Binary value of 1 is 00001 (as "a" have 5 bitfield) Binary value of 3 is 00011 (as "c" have 5 bitfield) Binary value of 3 is 000011 (as "b" have 6 bitfield)
The memory layout can be visualized as follows: 
The first 5 bits are occupied by a and have the value 00001. Then, 5 bits are occupied by b , having the value 00011 and the last 6 bits, by c with the value 000011.
So, at startup, the ptr is in memory location 1000, and now that you have done ptr++ . Since sizeof(char) is 1, ptr will move to 1 memory location. Therefore, ptr moves to memory location 1001.
Therefore, *ptr will give you the value stored in memory cell 1001, and therefore the answer will be 12
source share