10. What is the output of this C code?
#include <stdio.h>
int main()
{
void foo();
void fO
{
fo00;
}
fO;
}
void foo ()
{
printf("2");
}
Answers
Answer:
Explanation:
gcc /tmp/JxVOy4X9u9.c -lm
/tmp/JxVOy4X9u9.c: In function 'main':
/tmp/JxVOy4X9u9.c:6:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
6 | {
| ^
/tmp/JxVOy4X9u9.c:7:1: error: 'fo00' undeclared (first use in this function)
7 | fo00;
| ^~~~
/tmp/JxVOy4X9u9.c:7:1: note: each undeclared identifier is reported only once for each function it appears in
/tmp/JxVOy4X9u9.c:9:1: error: 'fO' undeclared (first use in this function)
9 | fO;
| ^~
/tmp/JxVOy4X9u9.c: At top level:
/tmp/JxVOy4X9u9.c:14:2: error: stray '\342' in program
14 | }
| ^
/tmp/JxVOy4X9u9.c:14:3: error: stray '\200' in program
14 | }
| ^
/tmp/JxVOy4X9u9.c:14:4: error: stray '\213' in program
14 | }
| ^