if(printf("0)) it just checks if the command printf is true which is tottally true and prints 0, then i=12. And finally it prints the i which is 12.
Moreover if(printf("0") ) first checks the condition printf("0") which is true, meaning that printing a character 0 it's tottaly true. SO, 0 is printed and i=12 (because if condition is true), and then i which is 12 is printed.
If you didnt understand tell me again to describe it better.