Hey folks,

I'm in need of some help finding/creating an algorithm to produce all binary strings given some length "n"

It doesn't have to be in C, but you all tend to give good answers so i thought id ask here.

My initial thought is to start at some pivot

_0_000 (pivot isolated by _ _)

and produce every 1/0 for the other bits.

_0_000

_0_001

_0_010

etc.

Translating this into actual source is proving quite difficult so I'm curious if anyone knows any permutation algorithms well suited for this problem.

Thank you!