ExamGecko
Question list
Search
Search

Question 92 - FC0-U61 discussion

Report
Export

Given the following pseudocode:

Which of the following is the output of the code?

A.
1
Answers
A.
1
B.
9
Answers
B.
9
C.
10
Answers
C.
10
D.
11
Answers
D.
11
Suggested answer: B

Explanation:

The code uses a for loop to iterate from 1 to 3, and assigns the value of i to the variable x. Then,it adds 3 to x and prints the result. The output of the code is:

3 (when i = 1, x = 1, x + 3 = 4) 6 (when i = 2, x = 2, x + 3 = 5) 9 (when i = 3, x = 3, x + 3 = 6)

asked 02/10/2024
Nazarii Bybyk
36 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first