Examveda

Comment on the output of the following C code.
#include <stdio.h>
int main()
{
    int i;
    for (i = 0;i < 5; i++)
    int a = i;
    printf("%d", a);
}

A. a is out of scope when printf is called

B. Redeclaration of a in same scope throws error

C. Syntax error in declaration of a

D. No errors, program will show the output 5

Answer: Option C


This Question Belongs to C Program >> Function

Join The Discussion

Related Questions on Function