Home / MCQ Bank / Computer
Computer Data Types And Variables Difficulty: Medium

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); } }

Select the correct option to test your answer:

More Computer Questions

Which of the following is a valid R data type? The property which is not supported by the circle is . . . . . . . . Among the given pointer which of the following cannot be incremented? What will be the output of the following Java code snippet? try (InputStream is = ...) { // do stuff with is... } catch (IOException e) { // handle exception } Which among the following is wrong for "register int a;"?