while((fgets(receiving array,50,file_ptr)!=EOF);
How this while is executed?
This is what my help files say about fgets return value...
char *fgets(char *s, int size, FILE *stream);
gets() and fgets() return s on success, and NULL on error or when end
of file occurs while no characters have been read.
>>How this while is executed?
Its an infinite loop because fgets() never returns EOF. fgets() returns NULL when it reaches end-of-file
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.