A

Admin • 833K Points
Coach

Q. What is the output of the following?

Code:
int a = 5;
printf("%d", a << 1);
  • (A) 5
  • (B) 10
  • (C) 2
  • (D) 15
  • Correct Answer - Option(B)
  • Views: 19
  • Filed under category C Programming
  • Hashtags:

Explanation by: Admin

Left shift by 1 multiplies the number by 2.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.