Here, (C) is the answer.
Here, a = $(320)_{10}$ = $(0000000101000000)_{2}$ = $(0140)_{16}$.
Short data type takes 2 bytes of memory.
*ptr is char pointer which points to the 1 byte memory location of stored value of variable a.
In little-endian representation of stored data is as least significant byte of stored value will be stored in first memory location and second least byte will be stored on subsequent memory locations and so on.
Refer, Endianness for more clarity on little-endian.
Suppose address of variable a is start at location A in byte addressable memory architecture. than $(40)_{16}$ will be store at location A and $(01)_{16}$ will be stored at address A+1 .
Little-Endian representation
$(40)_{16}$ |
$(01)_{16}$ |
Here, ptr points to the memory address A.
Here, *ptr prints the integer value of the byte stored on location A. which is $(40)_{16}$ = $(64)_{10}$.