Program in C to learn right shift, shiftright.c
#include<stdio.h>
int main()
{
printf("\n Bit wise left shift demo \n");
unsigned int value=32;
unsigned int shift=3;
value=value>>shift;//32>>3 means 32/(2*2*2)//means 4/(3 times 2)
printf("Result is: %d \n" ,value);
return 0;
}
No comments:
Post a Comment