Ace Learns Logo Ace Learns
  • Home
  • History
  • Geography
  • Astronomy
  • Physics
  • Chemistry
  • Biology
  • Agriculture
  • Sports
  • Computer Science
  • Articles
  • Contact Us
MCQ Categories
  • Articles
  • Home
  • Contact Us
  • Home
  • »
  • Computer Science
  • »
  • Programming in C
  • »
  • Operators in C
  • »
  • What is the output of the expression 10 << 2 in C?

Programming in C

unfold_more
  • double_arrow Data Types in C
  • double_arrow Operators in C

What is the output of the expression 10 << 2 in C?

The << operator in C represents left shift. It shifts the bits in the left operand to the left by the number of places provided in the right operand.

In this situation, 10 is represented in binary as 0000 1010. 10 << 2 shifts the bits of 10 two positions to the left. After the left shift, the binary representation becomes 0010 1000, corresponding to decimal 40. Thus, the result of 10 << 2 is 40.

Related Questions

  • What is the result of the following C program?
  • What will be the output of the following C program?
  • What is the output of the following code?
  • What does the ! operator do in C?
  • How many operands does the ternary conditional operator require in C?

Quick Links

  • Sports
    • chevron_right Cricket
    • chevron_right Asian Games
    • chevron_right Olympics
    • chevron_right Football
  • Astronomy
    • chevron_right The Universe
    • chevron_right High-Energy Astrophysics
    • chevron_right Stars
    • chevron_right Space Exploration
  • Geography
    • chevron_right Geomorphology
    • chevron_right Climatology
    • chevron_right Geopolitics and Global Issues
    • chevron_right Oceanography
  • History
    • chevron_right Revolution and Counter-Revolution
    • chevron_right Medieval World History
    • chevron_right Industrialization
    • chevron_right Ancient Civilizations

Ace Learns Logo Ace Learns © 2026 Ace Learns. All rights reserved.
  • Contact Us
  • Copyright
  • Privacy Policy