Ask Question
12 May, 11:30

assume an int array, candy, stores the number of candy bars sold by a group of children wherecandy[j] is the number of candy bars sold by child j. Assume there are 12 children in all. Which of the following code could be used to compute the total number of bars sold by the children? a) for (int j=0; j<12; j++) sum + = candy[j]; b) for (int j=0; j<12; j++) candy[j] = sum; c) for (int j=0; j<12; j++) sum = candy[j]; d) for (int j=0; j<12; j++) sum + = [j]; e) for (int j=0; j<12; j++) [j] + = sum;

+5
Answers (2)
  1. 12 May, 12:00
    0
    The first one. Important notice sum should be equal to zero before calculating the total sum.
  2. 12 May, 13:44
    0
    it is A
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “assume an int array, candy, stores the number of candy bars sold by a group of children wherecandy[j] is the number of candy bars sold by ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers