Showing posts with label Program to shift inputed data by two bits to the left.. Show all posts
Showing posts with label Program to shift inputed data by two bits to the left.. Show all posts

Program to shift inputed data by two bits to the left.

Program to shift inputed data by two bits to the left.
#include<stdio.h>
#include<conio.h>
void main()
{
int x,y;
clrscr();
printf(“Read the integer from keyboard :- ”);
scanf(“%d”,&x);
x<<=3;
y=x;
printf(“\nThe left shifted data is = %d ”,y);
getch();
}
Output:
Read the integer from keyboard :- 2
The left shifted data is = 16