diff options
Diffstat (limited to 'CSAPP/shift.c')
| -rw-r--r-- | CSAPP/shift.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CSAPP/shift.c b/CSAPP/shift.c new file mode 100644 index 0000000..3b088cf --- /dev/null +++ b/CSAPP/shift.c @@ -0,0 +1,7 @@ +long shift(long x, long n) { + x <<= 4; + x >>= n; + return x; +} + + |
