Q 6 What will this program print?
main()
{
int i = 2;
{
int i = 4, j = 5;
printf("%d %d", i, j);
}
printf("%d %d", i, j);
}
Answers
Answered by
0
Answer:
Error
Explanation:
The first print statement doesn't cause any problem because in that local scope both 'i' and 'j' are declared. In the next print statement, we tried to print both the variables but only 'i' declared in that scope 'j' remain as undeclared so we are getting errors like 'j' is not declared.
Similar questions