fork download
  1. void func1 (int &x) {
  2. x = 9 * x;
  3. }
  4.  
  5. void func2 (int v[]) {
  6. v[0] = 9 * v[0];
  7. }
  8.  
  9. int main (void) {
  10. int x, v[2];
  11. x = 111;
  12. func1 (x); printf ("x: %d\n", x);
  13. v[0] = 111;
  14. func2 (v); printf ("v[0]: %d\n", v[0]);
  15. return 0;
  16. }
Compilation error #stdin compilation error #stdout 0s 9424KB
stdin
Standard input is empty
compilation info
prog.c:1:17: error: expected ‘;’, ‘,’ or ‘)’ before ‘&’ token
 void func1 (int &x) {
                 ^
prog.c: In function ‘main’:
prog.c:12:4: warning: implicit declaration of function ‘func1’ [-Wimplicit-function-declaration]
    func1 (x); printf ("x: %d\n", x);
    ^~~~~
prog.c:12:15: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
    func1 (x); printf ("x: %d\n", x);
               ^~~~~~
prog.c:12:15: warning: incompatible implicit declaration of built-in function ‘printf’
prog.c:12:15: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
stdout
Standard output is empty