Created
December 21, 2019 01:49
-
-
Save parzibyte/a6e96ccb4befff0f040f5e37a5087fc1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void cadena_aleatoria(int longitud, char *destino) { | |
char muestra[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; | |
for (int x = 0; x < longitud; x++) { | |
int indiceAleatorio = aleatorio_en_rango(0, (int) strlen(muestra) - 1); | |
destino[x] = muestra[indiceAleatorio]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment