mardi 14 juillet 2020

If statement in C ()

I have a question about the if statement in C .

Let's say I have

int a = 5; // Or any other number (negative or positive) except 0 .

if (a) printf("Yes");

Shouldn't this if statement only be true when (a ==1) ???

I thought that if (a) means only if (a == 1)

Aucun commentaire:

Enregistrer un commentaire