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

main() { static int var = 5; printf("%d ",var--); if(var) main(); }

1 Answers  


prog. to produce 1 2 3 4 5 6 7 8 9 10

4 Answers   TCS,


const int perplexed = 2; #define perplexed 3 main() { #ifdef perplexed #undef perplexed #define perplexed 4 #endif printf("%d",perplexed); } a. 0 b. 2 c. 4 d. none of the above

1 Answers   emc2, HCL,


can u give me the c codings for converting a string into the hexa decimal form......

1 Answers  


Is this code legal? int *ptr; ptr = (int *) 0x400;

1 Answers  






Finding a number multiplication of 8 with out using arithmetic operator

8 Answers   Eyeball, NetApp,


main() { int i=300; char *ptr = &i; *++ptr=2; printf("%d",i); }

4 Answers   CSC,


write a origram swaoing valu without 3rd variable

2 Answers  


Write a program to print a square of size 5 by using the character S.

6 Answers   Microsoft,


can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail

0 Answers   TCS,


int main() { int x=10; printf("x=%d, count of earlier print=%d", x,printf("x=%d, y=%d",x,--x)); getch(); } ================================================== returns error>> ld returned 1 exit status =================================================== Does it have something to do with printf() inside another printf().

2 Answers  


#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }

1 Answers  


Categories