Pop top canvas material

Generate all binary strings of length n in c++

Please help me to solve this task: Generate all binary strings of length n with k bits set.(need to write on C) for example: n=5 k=3 11100 00111 11010 01011 **01110 11001 10011 **01101 **10110 101...