fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int * p;
  6. *p= &2;
  7. printf("%d",p);
  8.  
  9. return 0;
  10. }
  11.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:6:5: error: lvalue required as unary ‘&’ operand
 *p= &2;
     ^
prog.c:7:11: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘int *’ [-Wformat=]
  printf("%d",p);
           ^
stdout
Standard output is empty