## [Solved] All binary permutations of a fixed length in C

The answer goes like this. In C, the natural way to deal with an array of [0,1] is by treating them as bits. The 2^24 permutations of 24 bits are precisely the values of unsigned int from 0 to 2^24-1. So the question essentially is how to write the code based on that data structure. … Read more