Q:

What does the condition in the following code do " if (y-3) printf("1"); else printf("2"); "

I understand a condition is supposed to be for example y==3, but y-3 is totally confusing to me. I can't understand this code. If y-3 is true it prints 1. How can y-3 be true or false?

A:

The expression y - 3 results in a value which can be tested for truthness.  In C 0 is false and any non-zero value is true.  Saying if (y - 3) is essentially saying if (y - 3 != 0) or even more succinctly if (y != 3) 

