I need to generate a random number of 0's and 1's in C. Try to make two variables with random numbers, that of 0's and 1's, and the other so that it is the limit of a cycle that is executed to generate those 0's and 1's. I hope someone can help me. I leave part of the code to tell me if I'm wrong, lost or almost dead hahaha
int aleat = rand()%100+1;//aleat es el tope del ciclo
for(int i = 0; i <aleat; i++){
numero[i] = rand()%1+1; //0 o 1 generado que se guarda en un arreglo
}