Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdbool.h>
- #include <stdint.h>
- #include <stdio.h>
- #include <stdlib.h>
- #define MAX_COLORS 64
- #define FULL (~(pset_t) 0)
- typedef uint64_t pset_t;
- const char color_table[] = "123456789"
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- "abcdefghijklmnopqrstuvwxyz"
- "@&*";
- void
- pset_print (pset_t pset)
- /*
- * pset_print print a pset_t bit to bit, with the strongest on the left
- */
- {
- int i;
- for (i = 0; i < 64; i++)
- {
- printf("%lld", (pset >> (63 - i)) & 1);
- }
- printf("\n");
- }
- int main(void)
- {
- pset_t p = 1;
- int i = 64;
- pset_print(p<<(i-1));
- pset_print(p<<i);
- return 1;
- }
Add Comment
Please, Sign In to add comment