MCQs > IT & Programming > C Programming > Following code snippet? int b = 5; main() { void addup (int b); int i; for(i=1; i<=5; i++) addup(1); return 0; } void addup (int b) { static int v1; v1 = v1+b; printf('%d ', v1); }

C Programming MCQs

What would be printed on the standard output as a result of the
following code snippet?
int b = 5;
main()
{
void addup (int b);
int i;
for(i=1; i<=5; i++)
addup(1);
return 0;
}
void addup (int b)
{
static int v1;
v1 = v1+b;
printf("%d ", v1);
}

Answer

Correct Answer: 1 2 3 4 5

Explanation:

Note: This Question is unanswered, help us to find answer for this one

C Programming Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

C Programming Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it