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 will be the output of the following C program?
  • What is the output of the following code?
  • What is the result of the following C program?
  • How many operands does the ternary conditional operator require in C?
  • Which operator in C is used to access the address of a variable?

Quick Links

  • Computer Science
    • chevron_right Operating System
    • chevron_right Language Processors
    • chevron_right Cloud Computing
    • chevron_right Computer Organization
  • Sports
    • chevron_right Football
    • chevron_right Common Wealth Games
    • chevron_right Asian Games
    • chevron_right Olympics
  • History
    • chevron_right Enlightenment and Modern ideas
    • chevron_right Revolution and Counter-Revolution
    • chevron_right Ancient Civilizations
    • chevron_right Industrialization
  • Biology
    • chevron_right Plants
    • chevron_right Essential Nutrients
    • chevron_right Genetics
    • chevron_right Cell Biology

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