Q97
What will be the output of the following Java program? class evaluate public static void main(String args[]) int a[] = 1,2,3,4,5; int d[] = a; int sum = 0; for (int j = 0; j < 3; ++j) sum += (a[j] * d[j + 1]) + (a[j + 1] * d[j]); System.out.println(sum);
A.
38
B.
39
C.
40
AnswerD.
41
Answer: Option C
Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board