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

Comment on the following 2 C programs.

#include <stdio.h> //Program 1int main(){ int a; int b; int c;}#include <stdio.h> //Program 2int main(){ int a; { int b; } { int c; }}
Correct Answer 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

Related Questions

What is the difference between the following 2 C codes?
#include  //Program 1int main(){ int d, a = 1, b = 2; d = a++ + ++b; printf("%d %d %d", d, a, b);}

#include  //Program 2int main(){ int d, a = 1, b = 2; d = a++ +++b; printf("%d %d %d", d, a, b);}
What is the difference between the following 2 codes?
#include  //Program 2int main(){ int d, a = 1, b = 2; d = a++ +++b; printf("%d %d %d", d, a, b);}
Comment on the output of the following C code.
#include int main(){ int a = 10; int **c -= &&a;}