Tuesday 21 April 2020

Program to shift input 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();
}

No comments:

Post a Comment