Interview Question 3558

Created by admin on Sat, 17/11/2012 - 12:33
Explanation: 
Labels have functions scope, in other words The scope of the labels is limited to functions . The label 'here' is available in function fun() Hence it is not visible in function main..
Question: 

main()
{
int i=1;
while (i<=5)
{
printf("%d",i);
if (i>2) goto here; i++;
}
}
fun() { here: printf("PP");
}

Language: 
Answer: 

Compiler error: Undefined label 'here' in function main.