fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. int arr[2];
  6. int **ptr;
  7. ptr = &arr;
  8.  
  9. // Чтобы не ругалось на неиспользуемую переменную.
  10. (void) ptr;
  11. }
  12.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:7:9: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
     ptr = &arr;
         ^
cc1: all warnings being treated as errors
stdout
Standard output is empty