Users Also Read
MCQ's Search Engine
Electrical Engineering
Mechanical Engineering
Civil Engineering
Automobile Engineering
Chemical Engineering
Computer Engineering
Electronics Engineering
Medical Science Engg
#include
int c[10] = (1, 2, 3, 4, 5, 6, 7, 8, 9, 0);
main()
{
int a, b = 0;
for (a = 0; a < 10; ++a)
if ((c[a]%2) == 1) b += c[a];
printf("%d", b);
}, Options are ⇒ (A) 20, (B) 25, (C) 30, (D) 45, (E) None of the above, Leave your comments or Download question paper.
What will be the output after the following
program is executed? #include int c[10] = (1, 2, 3, 4, 5, 6, 7, 8, 9, 0); main() { int a, b = 0; for (a = 0; a < 10; ++a) if ((c[a]%2) == 1) b += c[a]; printf("%d", b); } | |
A. | 20 [Wrong Answer] |
B. | 25 [Correct Answer] |
C. | 30 [Wrong Answer] |
D. | 45 [Wrong Answer] |
E. | None of the above [Wrong Answer] |