main()

{

int i=1;

while (i<=5)

{

printf("%d",i);

if (i>2)

goto here;

i++;

}

}

fun()

{

here:

printf("PP");

}



main() { int i=1; while (i<=5) { ..

Answer / susie

Answer :

Compiler error: Undefined label 'here' in function main

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.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Code Interview Questions

how many processes will gate created execution of -------- fork(); fork(); fork(); -------- Please Explain... Thanks in advance..!

8 Answers   GATE,


main() { char *p; p="%d\n"; p++; p++; printf(p-2,300); }

1 Answers  


char *someFun() { char *temp = “string constant"; return temp; } int main() { puts(someFun()); }

1 Answers  


Write a routine that prints out a 2-D array in spiral order

3 Answers   Microsoft,


what is the code of the output of print the 10 fibonacci number series

2 Answers  






what is variable length argument list?

2 Answers  


main() { unsigned char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

1 Answers  


write a c program to Create a mail account by taking the username, password, confirm password, secret_question, secret_answer and phone number. Allow users to register, login and reset password(based on secret question). Display the user accounts and their details .

2 Answers  


print numbers till we want without using loops or condition statements like specifically(for,do while, while swiches, if etc)!

11 Answers   Wipro,


Set up procedure for generating a wire frame display of a polyhedron with the hidden edges of the object drawn with dashed lines

0 Answers   IBM,


main() { int x=5; clrscr(); for(;x<= 0;x--) { printf("x=%d ", x--); } } a. 5, 3, 1 b. 5, 2, 1, c. 5, 3, 1, -1, 3 d. –3, -1, 1, 3, 5

2 Answers   HCL,


Is the following code legal? typedef struct a aType; struct a { int x; aType *b; };

1 Answers  


Categories