main()
{
int i=1;
while (i<=5)
{
printf("%d",i);
if (i>2)
goto here;
i++;
}
}
fun()
{
here:
printf("PP");
}
Answer Posted / jaroosh
Exactly, to be able to move control flow to here, you would
have to make a long jump using not very common functions
(that do actually more than goto) : setjmp and longjmp
(please look up those functions in google or some C standard
library reference).
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
Explain modulus operator. What are the restrictions of a modulus operator?
How to implement a packet in C
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
which is an algorithm for sorting in a growing Lexicographic order
Write a Program to find whether the given number or string is palindrome.
Why cant I open a file by its explicit path?
What is the argument of a function in c?
find out largest elemant of diagonalmatrix
What does the error message "DGROUP exceeds 64K" mean?
Can you add pointers together? Why would you?
Is array a primitive data type in c?
I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.
What is the best way to store flag values in a program?
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }