Open main menu

CDOT Wiki β

Changes

Week 3

491 bytes added, 14:10, 27 May 2010
no edit summary
done.
 
Lazy evaluation - checks the first condition and doesn't bother with the next && condition because the first condition determines the whole condition.
 
Operators are operators in C so if you can use + without an if statement, you can use conditional operators without an if statement:
 
a[i]>3 && printf("%d\n", a[i]);
 
that will print all numbers greater than 3 in the array of a.
 
the default for && to continue is true, false to stop
the default for || to continue is false, true to stop
1
edit