This code is help you to generate random characters,
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <conio.h>
int main()
{
int x,i,m=1;
char Str;
srand((unsigned)time(NULL));
for(x=0;x<=100;x++)
{
i = rand()/100;
Str = i;
if(m<=5)
{
if((Str >= 'A' && Str <= 'Z') || (Str >= 'a')&&(Str <= 'z'))
{
Str = i;
printf("%c",Str);
m++;
}
}
}
getch();
return 0;
}