[Solved] What does a ! operator mean if put in front of a variable?
!ok is the same as ok == 0. Remember that in C, any non-zero scalar value in a Boolean context means “true” while zero means “false”. It’s a common C idiom to write !foo instead of foo == 0. It works for pointers as well: FILE *foo = fopen( “some_file”, “r” ); if ( !foo … Read more