Generate random bits

I want to generate random bits of 0 and 1

Below I attach my codes

problem:- I am able to get a random number but if I want to say 6 number then each time I get same random number

example:-
my input:

6 //total random numbers

4 //total bits in one random number

my output

1 0 0 0

1 0 0 0

1 0 0 0

1 0 0 0

1 0 0 0

1 0 0 0

what I want is every time there should be a random number like

1 0 1 0

1 1 1 0

1 1 0 1

1 1 1 1

10 0 0

0 0 1 1

@aattuull

There is just a small fix. For every combination you generate, you seed the random number with the 0 again because of which it resets and the same number is generated. I have placed the seed in the main function. It works fine now.

If my answer was able to resolve your query, please mark the doubt as resolved.