Shift operator in C

Shift operator:

There are two types of shift operator in C programming language. 

  1. Left shift operator
  2. Right shift operator

1. Left shift (<<) : The Left Shift (<<) operator is called as the arithmetic left shift operator. This operator works for both signed as well as unsigned numbers and also to types like int, long, char, etc.
This operator shifts the left operand, left by the number of bits specified by the right operand. For example –

Explanation : Here we are operating the left shift operation on the number 12. The bitwise representation(assuming that it’s a 8 bit number) of the number 12 is – 0000 1100. The expression “i