Hi,

I wish to generate all the binary combinations for an input size n. So, the number of combinations in this case would be (2^n) and if n=2 my output should be :

00

01

10

11

How can i do it? What would be the best way?

Thanks

Recommended Topics