- Which one is the logical “and” operator in C,
&&
or&
or both? - Which one is the logical “negation” operator in C,
~
or!
or both? - What is the result of evaluating
(34 + 2) / 40 || 80 > 'A' && 15 % 4
? - What does the keyword break do in a control structure?
- What does the keyword continue do in loops?
- What is the output of this code segment?
for (int i = 100; i > 0; i -= 20) printf("%d ", i);
- What is the value of
i
after the code segment above? - Rewrite the
for
loop from question 6 using awhile
loop and other statements as needed. - What is printed by the following code segment? What is the value of num after the segment executes?
int num = 6; if ( num = 24 / 3 && 'c' > 'D' || ++num) printf("first"); else printf("second");