fork download
  1. #include<stdio.h>
  2. void main(){
  3. const int x=25;
  4. int * const p=&x;
  5. *p=2*x;
  6. printf("%d",x);
  7. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:2:15: error: ‘::main’ must return ‘int’
     void main(){
               ^
prog.cpp: In function ‘int main()’:
prog.cpp:4:20: error: invalid conversion from ‘const int*’ to ‘int*’ [-fpermissive]
     int * const p=&x;
                    ^
stdout
Standard output is empty