Day 4 Recap Questions
  1. Which one is the logical “and” operator in C, && or & or both?
  2. Which one is the logical “negation” operator in C, ~ or ! or both?
  3. What is the result of evaluating (34 + 2) / 40 || 80 > 'A' && 15 % 4 ?
  4. What does the keyword break do in a control structure?
  5. What does the keyword continue do in loops?
  6. What is the output of this code segment?
    for (int i = 100; i > 0; i -= 20) printf("%d ", i);
    
  7. What is the value of i after the code segment above?
  8. Rewrite the for loop from question 6 using a while loop and other statements as needed.
  9. 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");