I have the following struct:
typedef struct School
{
int numOfStudents;
} School;
For example if I have a struct:
School s;
I want to check whether the struct is null like this:
if(s) {
printf("null");
}
This will not compile and error message is as follows:
error: used struct type value where scalar is required
Why can't I check structs for NULLness inside if statement in C?