summaryrefslogtreecommitdiffstats
path: root/2/8.c
diff options
context:
space:
mode:
authorSadeep Madurange <smadurange@users.noreply.github.com>2021-12-01 21:44:14 +0800
committerSadeep Madurange <smadurange@users.noreply.github.com>2021-12-01 21:44:14 +0800
commitc800a6727d58641f97db0f24a6e3ad1076a4eec7 (patch)
tree6fff8e6ebebf8e85e037878a54630f6982390c1e /2/8.c
parentb289ca6aad91532fd6598be112f656f51fffcfc7 (diff)
downloadk&r-exercises-c800a6727d58641f97db0f24a6e3ad1076a4eec7.tar.gz
Clean up.
Diffstat (limited to '2/8.c')
-rw-r--r--2/8.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/2/8.c b/2/8.c
index 2d57301..4ce829b 100644
--- a/2/8.c
+++ b/2/8.c
@@ -1,17 +1,6 @@
#include <stdio.h>
/* rotates x to the right by n positions */
-unsigned rightrot(unsigned x, int n);
-
-int main(int argc, char *argv[]) {
- unsigned x;
-
- x = rightrot(0x7, 3);
- printf("rotated: %x\n", x);
-
- return 0;
-}
-
unsigned rightrot(unsigned x, int n) {
return (x >> n) | (x << (32 - n));
} \ No newline at end of file