-
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int n = 0, L = 0;
while (Read: n < 25)
{
n++;
while (L < 15)
{
printf("Ajit");
goto Read;
}
}
}
-
- Compilation Error
- Garbage value
- Ajit
- Runtime Error
- None of these
Correct Option: A
Compilation Error
main.c: In function ‘main’:
main.c:5:16: error: ‘Read’ undeclared (first use in this function); did you mean ‘fread’?
while (Read: n < 25)
^~~~
fread
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:20: error: expected ‘)’ before ‘:’ token
while (Read: n < 25)
^
main.c:11:17: error: label ‘Read’ used but not defined
goto Read;