fork(4) download
  1. #include <stdio.h>
  2. aaa() { printf(“Hi”); }
  3. bbb() { printf(“Hello”); }
  4. ccc() { printf(“VIT”); }
  5. main()
  6. {
  7. int (*p[3])();
  8. p[0] = aaa;
  9. p[1] = bbb;
  10. p[2] = ccc;
  11. *p[1]();
  12. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:2:1: warning: return type defaults to 'int' [-Wimplicit-int]
 aaa() { printf(“Hi”); }
 ^
prog.c: In function 'aaa':
prog.c:2:1: error: stray '\342' in program
prog.c:2:1: error: stray '\200' in program
prog.c:2:1: error: stray '\234' in program
prog.c:2:1: error: stray '\342' in program
prog.c:2:1: error: stray '\200' in program
prog.c:2:1: error: stray '\235' in program
prog.c:2:19: error: 'Hi' undeclared (first use in this function)
 aaa() { printf(“Hi”); }
                   ^
prog.c:2:19: note: each undeclared identifier is reported only once for each function it appears in
prog.c: At top level:
prog.c:3:1: warning: return type defaults to 'int' [-Wimplicit-int]
 bbb() { printf(“Hello”); }
 ^
prog.c: In function 'bbb':
prog.c:3:1: error: stray '\342' in program
prog.c:3:1: error: stray '\200' in program
prog.c:3:1: error: stray '\234' in program
prog.c:3:1: error: stray '\342' in program
prog.c:3:1: error: stray '\200' in program
prog.c:3:1: error: stray '\235' in program
prog.c:3:19: error: 'Hello' undeclared (first use in this function)
 bbb() { printf(“Hello”); }
                   ^
prog.c: At top level:
prog.c:4:1: warning: return type defaults to 'int' [-Wimplicit-int]
 ccc() { printf(“VIT”); }
 ^
prog.c: In function 'ccc':
prog.c:4:1: error: stray '\342' in program
prog.c:4:1: error: stray '\200' in program
prog.c:4:1: error: stray '\234' in program
prog.c:4:1: error: stray '\342' in program
prog.c:4:1: error: stray '\200' in program
prog.c:4:1: error: stray '\235' in program
prog.c:4:19: error: 'VIT' undeclared (first use in this function)
 ccc() { printf(“VIT”); }
                   ^
prog.c: At top level:
prog.c:5:1: warning: return type defaults to 'int' [-Wimplicit-int]
 main()
 ^
prog.c: In function 'main':
prog.c:11:1: error: invalid type argument of unary '*' (have 'int')
 *p[1]();
 ^
prog.c: In function 'aaa':
prog.c:2:1: warning: control reaches end of non-void function [-Wreturn-type]
 aaa() { printf(“Hi”); }
 ^
prog.c: In function 'bbb':
prog.c:3:1: warning: control reaches end of non-void function [-Wreturn-type]
 bbb() { printf(“Hello”); }
 ^
prog.c: In function 'ccc':
prog.c:4:1: warning: control reaches end of non-void function [-Wreturn-type]
 ccc() { printf(“VIT”); }
 ^
stdout
Standard output is empty