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

Quick Links

  • Computer Science
    • chevron_right Digital Logic
    • chevron_right Analysis and Design of Algorithms
    • chevron_right Language Processors
    • chevron_right Computer Organization
  • Geography
    • chevron_right Geopolitics and Global Issues
    • chevron_right Regional Geography
    • chevron_right Climatology
    • chevron_right Oceanography
  • Current Affairs & Events
    • chevron_right Daily Current Affairs
    • chevron_right Latest Current Events
  • History
    • chevron_right Industrialization
    • chevron_right Enlightenment and Modern ideas
    • chevron_right Medieval World History
    • chevron_right Revolution and Counter-Revolution

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