Vidyalelo
C Programming · Q200

C Fundamentals

Programming · C Programming · question 200

Q200

What will be the output of the following C code? #include int main() int x = 2; x = x << 1; printf("%d ", x);

A.
4
Answer
B.
1
C.
Depends on the compiler
D.
Depends on the endianness of the machine

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board