2 votes 2 votes What is the output of the following program? #include<stdio.h> main() { int a, b =0; static int c[10]={1, 2, 3, 4, 5, 6, 7, 8, 9, 0}; for (a=0; a<10; ++a) int ((c[a]%2)==0) b+=c[a]; printf(“%d”, b); } 15 25 45 20 Programming and DS ugcnetcse-sep2013-paper3 programming-in-c + – go_editor asked Jul 24, 2016 • recategorized Oct 19, 2018 by Pooja Khatri go_editor 8.3k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes Given code is for (a=0; a<10; ++a) int ((c[a]%2)==0) b+=c[a]; for loop will read each value in array. If value will is even it is added to b b =2+4+6+8+0 =20 Ans :20 sh!va answered Jul 24, 2016 sh!va comment Share Follow See 1 comment See all 1 1 comment reply vijaycs commented Jul 24, 2016 reply Follow Share int ((c[a]%2)==0) b+=c[a]; it should be if((c[a]%2)==0) b+=c[a]; right ?? 0 votes 0 votes Please log in or register to add a comment.