Teaching UGC NET Mock Test Series 2025 (Paper 1 & 2) Programming and Data Structure Programming in C
What is the output of the given C program?
#include
int main(void) {
int i, s1=0, s2=0;
int a[6]={10, 11, 12, 13, 14, 15);
for (i=0; i<6; i++)
{
if (a[i]%2==0)
s1 = s1+a[i];
else
s2 = s2+a[i];
}
printf("%d,%d\n", s1, s2);
return 0;
1
36, 0
2
0, 39
3
36, 39
4
None of these