hello
i have a problem in reading lines from a file.i use the following code and the printf returns null.
char* x;
MAXLINE =100;
char line[MAXLINE];
FILE *source;
source = fopen("data.txt","r");
if (source == NULL){
printf("ERROR!!!file not found!");}
while(!feof(source)){
x = fgets(line,MAXLINE,source);
printf("%s\n",x);}
fclose(source);