Kizspy | Question: 34
(Choose 1 answer)
Consider an array a with n elements. The code snippet above is executed to calculate the values. Which of
the following options correctly describes the value of s after executing the code snippet?
int a[MAX_SIZE];
int s = 0;
for (int i = 0; i < n; i++)
s = s + a[i]* a[i];
A. The sum of squares of all elements in the array a.
B. The sum of all even elements in the array a.
C. The sum of all odd elements in the array a.
D. The sum of all elements in the array a.