Question 27 of 92Programming Basicspseudocode

Consider the following pseudocode carefully and trace its execution step by step. What will be printed when this pseudocode is executed?

Integer arr[6] = {3, 8, 1, 9, 4, 6}
Integer max = arr[0], min = arr[0], i
For i = 1 to 5
    If arr[i] > max then max = arr[i]
    If arr[i] < min then min = arr[i]
End For
Print max - min

The verified answer and full solution are one login away

Every answer here is machine verified, with a step-by-step solution that teaches the method. Your login also unlocks a 7-question mock preview in the real exam interface.

Log in to see the answer
← Q26Q28Attempt the full timed mock

More pseudocode questions

Consider the following pseudocode carefully and trace its execution step by step. What wil... | TCS Smart Hiring Mock Test 1 | Classic Technology