Question: QUESTION 1 What is the difference between a while loop and a do-while loop? while loop checks the condition before the loop begins, whereas the



QUESTION 1 What is the difference between a while loop and a do-while loop? while loop checks the condition before the loop begins, whereas the do-while loop executes the body at least once before checking the condition while loop is used for counter-controlled and do while, is used for a sentinel loop. while loop is used for selection controlled and do-while is used for an infinite loop, while loop is used for endless controlled control and do-while, is used for counter-controlled loop QUESTION 2 Which statement has a similar logic to switch-case? multiple if-else multiple if for while QUESTION 3 A counter controlled loop means an infinite loop we can predict how many times the statement will repeat the body of the loop will execute at least once loop that repeats with no end QUESTION 4 Which of the following is NOT a loop structure? do..while switch..case while for QUESTIONS How many choices are possible when using a single if statement? More than 3 2 1 3 QUESTION 6 - How many times does this loop repeat? for (i = 5; i >10; i+=3) Not executed at all Infinite or unlimited 2 times 10 times QUESTION 7 Choose the statement that can work without error with const int z = 10;. printf("%.2f", z*2); z** z-(z>0)7 5:0 scanf("d", &2): QUESTION 8 What is the last value of x y and z? int X-3, -5, 20; 15 x > 0) 2x: (z > 0 XY KM 0) Y = 0 xis Sy is 5 and Z is o is sy is 5 and 2 is 3 is ay is 5 and Z is 8 SEVIS 5 ann an
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
