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

write a c program to Create employee record by taking details like name, employee id, address and phone number. While taking the phone number, take either landline or mobile number. Ensure that the phone numbers of the employee are unique. Also display all the details

2 Answers   TCS,


Printf can be implemented by using __________ list.

3 Answers  


void main() { int *i = 0x400; // i points to the address 400 *i = 0; // set the value of memory location pointed by i; }

2 Answers  


void main () { int x = 10; printf ("x = %d, y = %d", x,--x++); } a. 10, 10 b. 10, 9 c. 10, 11 d. none of the above

2 Answers   HCL,


Is the following statement a declaration/definition. Find what does it mean? int (*x)[10];

1 Answers  






#define a 10 int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } void foo() { #undef a #define a 50 }

3 Answers  


find simple interest & compund interest

2 Answers  


main() { int i = 3; for (;i++=0;) printf(ā€œ%dā€,i); }

1 Answers   CSC,


what is the output of following program ? void main() { int i=5; printf("%d %d %d %d %d ",i++,i--,++i,--i,i); }

10 Answers  


Write a C function to search a number in the given list of numbers. donot use printf and scanf

5 Answers   Honeywell, TCS,


#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }

2 Answers  


&#8206;#define good bad main() { int good=1; int bad=0; printf ("good is:%d",good); }

2 Answers  


Categories