Vidyalelo
C Programming · Q213

Function

Programming · C Programming · question 213

Q213

Comment on the output of the following C code. #include 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
Answer
D.
No errors, program will show the output 5

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board