level: Chapter 3 - Control structures
Questions and Answers List
level questions: Chapter 3 - Control structures
Question | Answer |
---|---|
What are the examples of null statements? | ; {} |
Conditional statements | Two-way-branching - if else Nested-branching - if else within if else Multiway-branching - switch case |
Enhanced switch statement | g |
Repitition statements | While loop (Head controlled) For Loop (Head controlled) Do Loop (Foot controlled) |
Types of jump statement | Break - exits the immediately surrounding loop or switch statement. continue (only in loops) - exits the current pass of the immediately surrounding loop and continues at the loop head. assert (for checking assertions) - Systematic testing of assertions helps to detect programming errors |
Riddle | WHAT IS THE LARGEST n FOR WHICH A CORRECT RESULT CAN BE EXPECTED? |