Kizspy | Question: 39
(Choose 1 answer)
FJOVERFLOW.COM
What is the results will be displayed on the screen after executing the following code:
int a[] = {1,2,3,4};
int i, s = 0;
for (i=0; i<4; ++i)
s += a[i];
printf("%f", (float)(s/4));
A. 2.5
B. 2
C. 2.500000
D. 2.000000