Submission #2656

# Submission time Handle Problem Language Result Execution time Memory
2656 2013-07-30T12:33:36 Z domece 짝수 정렬 (tutorial3) C
Compilation error
0 ms 0 KB
void sort_even(int N, int *A){
int i,j;
qsort(A,N,4,c);
for(i=0;i<N;i++){
int tmp=A[i];
int index=i;
for(j=1;j<N;j++){
if(tmp>A[j]) tmp=A[j],index=j;
}
A[i]^=A[index]^=A[i]^=A[index];
if(A[i]%2==0) Report(A[i]);
}
}

Compilation message

tutorial3.c: In function 'sort_even':
tutorial3.c:3:1: warning: implicit declaration of function 'qsort' [-Wimplicit-function-declaration]
tutorial3.c:3:13: error: 'c' undeclared (first use in this function)
tutorial3.c:3:13: note: each undeclared identifier is reported only once for each function it appears in
tutorial3.c:10:5: warning: operation on '*(A + (long unsigned int)((long unsigned int)i * 4ul))' may be undefined [-Wsequence-point]
tutorial3.c:11:1: warning: implicit declaration of function 'Report' [-Wimplicit-function-declaration]