What does the following method do?
Public int question15( )
{
Int value1 = 0;
Int value2 = 0;
For (int j = 0; j < 12; j++)
If (candy[j] > value1)
{
Value1 = candy[j];
Value2 = j;
}
Return value2;
}
A) It returns the total number of candy bars sold
B) It returns the total number of children who sold 0 candy bars
C) It returns the total number of children who sold more than 0 candy bars
D) It returns the number of candy bars sold by the child who sold the most candy bars
E) It returns the index of the child who sold the most candy bars
Correct Answer:
Verified
Q6: A Java main method uses the parameter
Q12: Both the Insertion Sort and the Selection
Q13: An int array stores the following values.
Q14: Which of the following is a legal
Q15: What does the following code do? Assume
Q16: For the questions below, assume an int
Q18: For the questions below, assume values is
Q20: For the questions below, assume values is
Q21: If int[] x = new int[15]; and
Q22: If a and b are both int
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents