9)Select the code snippet that calculates the sum of the array. a.) int[] ary =
ID: 3824906 • Letter: 9
Question
9)Select the code snippet that calculates the sum of the array.
a.) int[] ary = new int[N];
int sum = 0;
for (int i = 0; i < N; i++) {
sum += ary[N];
}
b.) int[] ary = new int[N];
int sum = 0;
for (int i = 0; i < N; i++) {
sum += ary[i];
}
c.) int[] ary = new int[N];
int sum = 0;
for (int i = 0; i < N; i++) {
sum *= ary[N];
}
10.)
Suppose in the code a function call is made
int x = 12;
int y = function (x);
c.) When the value of x is changed in the function, x will also change in the calling function.
13.) int x = 12;
double y = x / 4.0;
14.) Flag this Question
Question 134 pts
boolean A = true;
boolean B = false;
boolean Z = A AND B;
a.) int[] ary = new int[N];
int sum = 0;
for (int i = 0; i < N; i++) {
sum += ary[N];
}
Explanation / Answer
9)Ans) b
b.) int[] ary = new int[N];
int sum = 0;
for (int i = 0; i < N; i++) {
sum += ary[i];
}
_________________
10)Ans) b
_________________
13)Ans) a
_________________
14)Ans) c
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.