Examveda
Examveda

What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int x = 2;
    x = x << 1;
    printf("%d\n", x);
}

A. 4

B. 1

C. Depends on the compiler

D. Depends on the endianness of the machine

Answer: Option A


This Question Belongs to C Program >> C Fundamentals

Join The Discussion

Related Questions on C Fundamentals