FunctionTrouble
CodeChefOpen on judge ↗
Write the comparison function qs_compare()for the following code: struct date { int d,m,y; }; qs_compare(const void*,const void*); struct date dd[1000]; void main() { int i,w,n; w=sizeof(struct date); //Read the inputs qsort(dd,n,w,qs_compare);//n is the number of dates //Print the result } Input 5 17 11 62 24 8 78 17 11 62 16 12 76 19 2 94 Output 17-11-1962 17-11-1962 16-12-1
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start