Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<conio.h>
- #include<math.h>
- int bitsetq(int n, int b)
- {
- //function call to convert int b to it's 16-bit binary equivalent
- [Type?] test = 0000 0000 0000 0001;
- int twopow;
- twopow = pow(2, n); //2^n
- test = test << n;
- b = b & test;
- //function call to convert [type?] b to it's decimal equivalent.
- if(b == twopow); {
- return 1;
- }
- else {
- return 0;
- }
- }
Add Comment
Please, Sign In to add comment