fork(1) download
  1. #include <stdio.h>
  2. #include <string.h>
  3. #define K 4
  4. #define W 4
  5.  
  6. void swap( int (*m)[5], const int w1, const int w2)
  7. {
  8.  
  9. int (*temp)[5] = m[w1];
  10. m[w1] = m[w2];
  11. m[w2] = temp;
  12.  
  13. }
  14.  
  15.  
  16. int main(void) {
  17.  
  18. return 0;
  19.  
  20. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘swap’:
prog.c:9:20: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
   int (*temp)[5] = m[w1];
                    ^
prog.c:10:9: error: assignment to expression with array type
   m[w1] = m[w2];
         ^
prog.c:11:9: error: assignment to expression with array type
   m[w2] = temp;
         ^
stdout
Standard output is empty