fork download
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int n=10,*p;
  5. p=&n;
  6. printf("%d\n",&n);
  7. printf("%u\n",&n);
  8. printf("%d\n",p);
  9. printf("%u\n",p);
  10. p++;
  11. printf("%d\n",p);
  12. printf("%u\n",p);
  13. p+p+4;
  14. printf("%d\n",p);
  15. printf("%u\n",p);
  16. return 0;
  17. }
Compilation error #stdin compilation error #stdout 0s 9432KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:6:11: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘int *’ [-Wformat=]
  printf("%d\n",&n);
           ^
prog.c:7:11: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘int *’ [-Wformat=]
  printf("%u\n",&n);
           ^
prog.c:8:11: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘int *’ [-Wformat=]
  printf("%d\n",p);
           ^
prog.c:9:11: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘int *’ [-Wformat=]
  printf("%u\n",p);
           ^
prog.c:11:11: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘int *’ [-Wformat=]
  printf("%d\n",p);
           ^
prog.c:12:11: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘int *’ [-Wformat=]
  printf("%u\n",p);
           ^
prog.c:13:3: error: invalid operands to binary + (have ‘int *’ and ‘int *’)
  p+p+4;
   ^
prog.c:14:11: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘int *’ [-Wformat=]
  printf("%d\n",p);
           ^
prog.c:15:11: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘int *’ [-Wformat=]
  printf("%u\n",p);
           ^
stdout
Standard output is empty