if ( fgets( line, sizeof(line), stdin ) == (char*) 0 )...
I don't understand what this line does,anyone knows?
That's a rather odd way of writing a test for the return of a null pointer which indicates an error in fgets().
fgets()
I'd write it like this:
if (!fgets(line, sizeof(line), stdin))
2.1m questions
2.1m answers
60 comments
57.0k users