Question
Does this compile without error?
int main()
{
int k;
{
int k;
for (k = 0; k < 10; k++);
}
}
int main()
{
int k;
{
int k;
for (k = 0; k < 10; k++);
}
}
Answer: Option A
Was this answer helpful ?
There can be blocks inside block and within blocks variables have only block scope.
Output:
$ cc pgm5.c
Was this answer helpful ?
Submit Solution