0

int in_stock = 20; if (in_stock) printf("Order received.\n");

Inside if in_stock condition please explain what does it mean

22nd Mar 2019, 2:14 PM
Shailendra Singh
Shailendra Singh - avatar
3 Answers
+ 2
No negative is also true. Only 0 is false. https://code.sololearn.com/cUR79lDa5t2O/?ref=app You can test in Code Playground. 😉
22nd Mar 2019, 2:36 PM
Gordon
Gordon - avatar
+ 1
0 is false 20 is true
22nd Mar 2019, 2:23 PM
Gordon
Gordon - avatar
+ 1
It means greater than zero is true and 0 is false
22nd Mar 2019, 2:24 PM
Shailendra Singh
Shailendra Singh - avatar