PRF192_-_SU_2024_-_Block_5_-_FE_2675.webp
R

PRF192_-_SU_2024_-_Block_5_-_FE_2675.webp

Kizspy | Question: 36 (Choose 1 answer)
Consider an array a with n elements. The code snippet above is executed to calculate the value s. 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.

Thông tin

Category
PRF192
Thêm bởi
respectful_man
Ngày thêm
Lượt xem
2,127
Lượt bình luận
4
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom