Comment on the following 2 C programs.
#include < stdio.h > //Program 1
int main()
{
int a;
int b;
int c;
}
#include < stdio.h > //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
d) None of the mentioned
Answer: c
Related Posts
In a serial port interface, the INTR line is connected to _____
The standard used in serial ports to facilitate communication is _____
The data transfer in UART is done in ______
The key feature of UART is _____
UART stands for ________
_____ to increase the flexibility of the serial ports.
The double buffer is used for _________
Join The Discussion