If input value was shifted to the right on bit level. How can I determine whether a logical or arithmetic shift is performed.
Code:
#include <stdio.h>
#include <stdlib.h>
void main ()
{
printf("C- program that shifts any number two places to the right\n");
int InputNumber;
int ShiftedNumber;
printf("Please enter an integer: ");
scanf_s("%d",&InputNumber);
ShiftedNumber = InputNumber >> 2;
printf ("The number was shifted on bit level two places to the right: %d\n", ShiftedNumber);
}
Thanks in Advance!