I have some problems:
- How can I erase a file?
- How can I create a random string has 8 letters?
This is my code to create a random string has 8 letters:
char *b="";
int i,j;
FILE *f=fopen(file,"w");
for(i=0;i<4;i++)
{ for(j=0;j<7;j++)
*b+=char(random(27)+65);
fprintf(f,"%s\n",&b);
}
fclose(f);
But the result is wrong
Thank you!