You are not logged in.
- Topics: Active | Unanswered
Pages:: 1
#1 2015-09-15 05:37:35
Output Program:
C Programming Quizzes C Language Control Structures
Directions:
What is the output of the following program?
Question:
#include<stdio.h>
int c[10] = {1,2,3,4,5,6,7,8,9,10};
main()
{
int a, b=0;
for(a=0;a<10;++a)
if(c[a]%2 == 1)
b+=c[a];
printf("%d", b);
}
Option A):
24
Option B):
25
Option C):
20
Option D):
30
Correct Answer is Option B):
25
Failure is the first step towards seccess.
Offline
2015-09-15 05:37:35
- Advertisement
- Ads By Google
Re: Output Program:
\n
Pages:: 1