Gracias por toda la ayuda, pero me sigue crasheando el programa. Ahora lo tengo así:
Código (cpp) [Seleccionar]
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a, i, j, k, f;
int b[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
char c[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '\0'};
printf("==========================\n== Generador de codigos ==\n==========================\n\n* Ingrese 1 si quiere generar un codigo\n");
scanf("%i", &a);
char letra[5];
i = 0;
if (a != 1)
{
printf("Necesitas ingresar el numero 1 para generar un codigo\n");
}
if (a == 1)
{
printf("En breve se generara tu codigo\n");
for(j=0; j=5; j++)
{
i++;
k = 0;
k = 1 + rand() % 23;
c[k] = letra[i];
}
}
return 0;
}