See, I have executed the code in the compiler as well.

It is never going to come $22$.

ISRO has made so many blunders already.

Dark Mode

3,142 views

8 votes

Best answer

$\underline{\mathbf{Answer:}\Rightarrow}\;\;\mathbf{(d)}$

$\underline{\mathbf{Explanation:}\Rightarrow}\;$

$\underline{\textbf{Big-endian}:}$

It is the order in which the $\color{green}{\text{"big end" (most significant value in the sequence(MSB)}}$ is stored first $\color{green}{\text{at the lowest storage address}}$.

$\underline{\textbf{Little-endian}:}$

It is an order in which the $\color{green}{\text{"Little end" (LSB)}}$ is stored first.

Now the associativity of the comma (,) is from $\color{red}{\text{left to right.}}$

Also, the $\color{blue}{\text{precedence of the comma is lower than the equal to “=” operator}}$.

So, $\mathbf x$ will store only $\mathbf{622}$

Now, Binary value of $\mathbf{622}$ is given by $\underbrace{{\mathbf{00000010 \mid 01101110}}}_\text{= 622 in decimal representation}$

$\mathbf{\underbrace{00000010}_\text{MSB} \mid \underbrace{\color{magenta}{01101110}}_\text{LSB(110 in decimal form)}}$

$\underline{\color{blue}{\text{$\because$ Little-endian will store only lower bytes.}}}$

So, $\mathbf{110\;(decimal\;value)}$ will only be stored in $\mathbf x$.

$\therefore \; 110\times \underset{\color{green}{\mathrm x \% 3}}{1} = 110$

$\therefore \mathbf{(d)}$ is the correct option.

0

1