HEY there
I need to write a program that reads the autoexec.bat file
and if it reads blaster it must return a message reading thanks
here is my code but it's not working please help and thanks for all
the previous help
#include<stdio.h>
void main ()
{
int i;
char read[20];
FILE *ptr;
ptr = fopen ("\\Autoexec.bat","a+");
if(read[i] == "BLASTER")
fprintf(stdout,"Thanks");
i = fscanf(ptr," %s",&read);
for( ;i !=EOF; )
{
i = fscanf(ptr," %s",&read);
fprintf(stdout," %s",read);
}
getchar();
}