#include <stdio.h>
int main()
{
unsigned int num= 0xff;
printf("\nValue of num = %04X before right shift.",num);
num = (num>>2);
printf("\nValue of num = %04X after right shift.",num);
return 0;
}
C Programming
Program to demonstrate example of right shift (>>) operator.

Written by
View ProfileNikhil Juneja
Passionate software developer and technical contributor at TutorialsLink.
