What is Left shift ?
Basically,shifting are possible on binary bits.
Example-
Number is: 8
Its binary is 1000
Then one Left shift is 10000(i.e, 16 in decimal)
program-
#include< stdio.h>
int main() {
int n,a;
printf("Enter number\n");
scanf("%d",&n);
a=n< < 1;
printf("One Left shift is %d\n",a);
a=n< < 2;
printf("Two Left shift is %d\n",a);
a=n< < 3;
printf("Three Left shift is %d\n",a);
}
Enter number
3
One Left shift is 6
Two Left shift is 12
Three Left shift is 24