fork(4) download
  1. #include <stdio.h>
  2.  
  3. void main(void)
  4. {
  5. int i;
  6. char *pa;
  7. static char a[4] = {'A', 'B', 'C', 'D'};
  8. pa = a
  9. for (i = 0; i < 4; i++)
  10. { printf("a[%d]:%c *(pa+%d):%c \n", i, a[i], i, *(pa + i));}
  11. }
Compilation error #stdin compilation error #stdout 0s 4412KB
stdin
Standard input is empty
compilation info
prog.c:3:6: warning: return type of ‘main’ is not ‘int’ [-Wmain]
 void main(void)
      ^~~~
prog.c: In function ‘main’:
prog.c:9:3: error: expected ‘;’ before ‘for’
   for (i = 0; i < 4; i++)
   ^~~
prog.c:6:9: warning: variable ‘pa’ set but not used [-Wunused-but-set-variable]
   char *pa;
         ^~
prog.c:5:7: warning: unused variable ‘i’ [-Wunused-variable]
   int i;
       ^
stdout
Standard output is empty