Question PRG-C-0071
HardWhat is the output of this program?
#include <stdio.h>
int main() {
int arr[5] = {1, 2};
int s = 0;
for (int i = 0; i < 5; i++) s += arr[i];
printf("%d %zu", s, sizeof(arr) / sizeof(arr[0]));
return 0;
}
- A.
3 2
- B.
3 5
- C.
Sign up free to see the answer and a step-by-step explanation.