πŸ“Š C Programming
Q. What is the output of this program?
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) No errors, program will show the output 5
  • (D) Syntax error in declaration of a
πŸ’¬ Discuss
βœ… Correct Answer: (D) Syntax error in declaration of a

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
179
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
93%
Success Rate