The purpose of the code is to print something
Question: what is wrong in the error line?
Code:#include <stdio.h> #include <conio.h> #include <stdlib.h> main() { char ch; FILE *fp; puts("1\n"); fp = fopen("test.txt","r"); if(fp == NULL)puts("File not found."); puts("2\n"); while(ch == fgetc(fp))// error line { puts("3\n"); fputc(ch,stdout); } puts("4\n"); fclose(fp); getch(); }