Vidyalelo
C Programming · Q131

Function

Programming · C Programming · question 131

Q131

Comment on the following 2 C programs. #include //Program 1 int main() int a; int b; int c; #include //Program 2 int main() int a; int b; int c;

A.
Both are same
B.
Scope of c is till the end of the main function in Program 2
C.
In Program 1, variables a, b and c can be used anywhere in the main function whereas in Program 2, variables b and c can be used only inside their respective blocks
Answer
D.
None of the mentioned

Answer: Option C

Solution

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