Ask Question
18 September, 00:40

Evaluate the following code segment. What is the value of count after execution?

int count = 1;

for (int outer = 0; outer < 4; outer++)

for (int inner = 1; inner < 3; inner++)

count++;

1

3

9

12

13

+5
Answers (1)
  1. 18 September, 03:31
    0
    The outerloop loops 4 times (0,1,2 and 3), and the inner loop loops 2 times (1 and 2). So that is 8 increments of count that starts at 1. This should bring count to 9.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Evaluate the following code segment. What is the value of count after execution? int count = 1; for (int outer = 0; outer < 4; outer++) for ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers