a) i is -10
b) i is not 0

Condition statements in C/C++ language are treated as TRUE if it is not FALSE or not zero. And FALSE when it is zero.
In the first case i is -10 which not zero, thus the condition is true.
In the second case i is zero, thus the condition is false and execution goes to the else statement.

You have viewed 1 page out of 248. Your C learning is 0.00% complete. Login to check your learning progress.

 Vote 0

Similar topics related to this section

sizeof void, if, if-else, if-else-if, label and goto, switch case, compare with ==, execution sequence, loop statements, for, while, do-while loop syntax,

# C Programming Language (Prentice Hall Software)
# Let Us C Paperback - 2006 by Yashavant Kanetkar
# Understanding and Using C Pointers Core techniques for memory management
# Data Structures Using C and C++ Paperback - 1998
# Data Structures In C Paperback - August 11, 2008 by Noel Kalicharan