Learning and Teaching Coding
What is the output of the following code below?#include <stdio.h>void main() { int a[] = {1, 2, 3, 4,5}; int sum = 0; for(int i = 0; i < 4; i++) { sum += a[i]; } printf("%d", sum);}
1 year ago | [YT] | 4
Learning and Teaching Coding
What is the output of the following code below?
#include <stdio.h>
void main() {
int a[] = {1, 2, 3, 4,5};
int sum = 0;
for(int i = 0; i < 4; i++) {
sum += a[i];
}
printf("%d", sum);
}
1 year ago | [YT] | 4