Ask Question

What is sum after the following loop terminates? int sum = 0; int item = 0; do { item; sum = item; if (sum > 4) break; } while (item < 5);

+1
Answers (1)
  1. 19 May, 11:10
    0
    Int sum = 0;

    int item = 0;

    do

    {

    item;

    sum = item;

    if (sum > 4)

    break;

    } while (item < 5);

    You will generate a compile error, as having (item; ) as a statement on its own is invalid.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “What is sum after the following loop terminates? int sum = 0; int item = 0; do { item; sum = item; if (sum > 4) break; } while (item < 5); ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers