main()
{
int i=1;
while (i<=5)
{
printf("%d",i);
if (i>2)
goto here;
i++;
}
}
fun()
{
here:
printf("PP");
}
Answers were Sorted based on User's Feedback
Answer / surenda pal singh chouhan
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 ? | 16 Yes | 0 No |
Answer / 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 |
The program is error because of the "goto" statement can't
jump from one segment to another segment i.e not support for
long jump.
Is This Answer Correct ? | 3 Yes | 0 No |
write a c program to print the values in words eg:- 143 written it has (one hundred and forty three)& 104, 114 are also written words
5 Answers Captronic, DELL, Google, IBM, Mithi, RCC, Wipro,
write a c program to add two integer numbers without using arithmetic operator +
When a c file is executed there are many files that are automatically opened what are they files?
Write a program for print infinite numbers
Is malloc memset faster than calloc?
Who is the founder of c language?
What is the purpose of sprintf() function?
N O S I E R + A S T R A L ---------------- 7 2 5 6 1 3
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
What is the value of uninitialized variable in c?
What are 'near' and 'far' pointers?
Explain Basic concepts of C language?