diff options
| author | Sadeep Madurange <smadurange@users.noreply.github.com> | 2021-12-01 21:44:14 +0800 |
|---|---|---|
| committer | Sadeep Madurange <smadurange@users.noreply.github.com> | 2021-12-01 21:44:14 +0800 |
| commit | c800a6727d58641f97db0f24a6e3ad1076a4eec7 (patch) | |
| tree | 6fff8e6ebebf8e85e037878a54630f6982390c1e /2/7.c | |
| parent | b289ca6aad91532fd6598be112f656f51fffcfc7 (diff) | |
| download | k&r-exercises-c800a6727d58641f97db0f24a6e3ad1076a4eec7.tar.gz | |
Clean up.
Diffstat (limited to '2/7.c')
| -rw-r--r-- | 2/7.c | 15 |
1 files changed, 0 insertions, 15 deletions
@@ -1,21 +1,6 @@ #include <stdio.h> /* inverts n bits of x starting at p */ -unsigned invert(unsigned x, int p, int n); - -int main(int argc, char * argv[]) { - int n, p; - unsigned x; - - n = 3; - p = 5; - x = 0xB7; - - printf("result: %x\n", invert(x, p, n)); - - return 0; -} - unsigned invert(unsigned x, int p, int n) { unsigned mask, y; |
