Submission #2662

# Submission time Handle Problem Language Result Execution time Memory
2662 2013-07-30T12:40:05 Z domece 짝수 정렬 (tutorial3) C
Compilation error
0 ms 0 KB
int c(int*a){return *a-*1[&a];}

void sort_even(int N, int *A){
  qsort(A,N,4,c);
  for(int i = 0; i < N; i++) {
    if(A[i] % 2 == 0) Report(A[i]);
  }
}

Compilation message

tutorial3.c: In function 'sort_even':
tutorial3.c:4:3: warning: implicit declaration of function 'qsort' [-Wimplicit-function-declaration]
tutorial3.c:5:3: error: 'for' loop initial declarations are only allowed in C99 mode
tutorial3.c:5:3: note: use option -std=c99 or -std=gnu99 to compile your code
tutorial3.c:6:5: warning: implicit declaration of function 'Report' [-Wimplicit-function-declaration]