Created
April 15, 2021 14:55
-
-
Save btechmag/167891c64ade11bc32daef5219d18ee2 to your computer and use it in GitHub Desktop.
Program to read an integer from the keyboard and left shift the integer by two bits.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
int x; | |
printf("Read the integer from keyboard: "); | |
scanf("%d", &x); | |
printf("Integer value = %d", x); | |
x <<= 2; | |
printf("The left shifted data is %d", x); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment