if()

The answer to a stupid question: Does C enter an if() block when the value is -1? Yup.

if.c

Compiles clean (or should) with: gcc -o if if.c -Wall

#include <stdio.h>

int main(int argc, char **arv) 
{
    if(1)
    {
        printf("if() will enter when 1 is given.\n");
    }

    if(-1)
    {
        printf("if() will enter when -1 is given.\n");
    }

    if(0)
    {
        printf("if() will not enter when 0 is given.\n");
    }

    return 0;
}