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

  • Which operator in C is used to access the address of a variable?
  • What does the ! operator do in C?
  • What is the result of the following C program?
  • What is the value of x after the following code runs?
  • How many operands does the ternary conditional operator require in C?

Quick Links

  • Agriculture
    • chevron_right Mutations and Crop Improvement
    • chevron_right Major Crops and Classification
    • chevron_right Animal Husbandry
    • chevron_right Green Revolution
  • Physics
    • chevron_right Geometrical Optics
    • chevron_right Thermodynamics
    • chevron_right Dynamics
    • chevron_right Waves and Optics
  • History
    • chevron_right Enlightenment and Modern ideas
    • chevron_right Ancient Civilizations
    • chevron_right Industrialization
    • chevron_right Revolution and Counter-Revolution
  • Computer Science
    • chevron_right Programming in C
    • chevron_right Cloud Computing
    • chevron_right Databases
    • chevron_right Cryptography

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