The line checks if fgets return 0. The cast to char* is only to match the return type of fgets:
char * fgets ( char * str, int num, FILE * stream );
But 0 is implicit converted to char* if you remove it.
If you need more information on fgets look here