PROGRAM TO SHIFT INPUTTED DATA BY TWO BITS TO THE LEFT

/*PROGRAM TO SHIFT INPUTTED DATA BY TWO BITS TO THE    LEFT*/
#include<stdio.h>
#include<conio.h>
void main()
{
int n,i;
clrscr();
printf(“Enter the number on which left shift operation is to be performed: “);
scanf(“%d”,&n);
printf(“\nBefore shifting the number was: %d\n”,n);
i=n<<2;     //LEFT SHIFT OPERATION
printf(“After shifting the number is: %d\n”,i);
getch();
}

Leave a Reply

Your email address will not be published. Required fields are marked *