What does (char *)0 mean in c?

前端 未结 6 2179
臣服心动
臣服心动 2020-12-19 17:47
if ( fgets( line, sizeof(line), stdin ) == (char*) 0 )...

I don\'t understand what this line does,anyone knows?

6条回答
  •  情话喂你
    2020-12-19 18:50

    (char*) 0
    

    Is not a null character, but a pointer to a character at address 0.

    A character containing the value 0 would be:

    (char) 0
    

提交回复
热议问题