Write a C expression that takes two arguments a and b and y
- Write a C expression that takes two arguments a and b and yields a result that
is the LSB of a and the remaining bytes of b.
Solution
Answer:
The C expression is :
\" ( ( b << 1) | ( a & 1) ) \"
Explaination : First we shift all bits of B to right side by 1 position (B << 1) . This makes a space for LSB of A . Then we extract LSB of A and then we OR them together.
