[1] . You were lacking the compare function which is used with qsort and # signs which are required for preprocessing stage for the compiler before he header file and macro.
[1]: http://ideone.com/URhvc2
I don’t think so because of macro. Macros are resolved at the preprocessing stage of the compiler i.e. if you have written #define a 4, then wherever in your code a exists, it’ll be replaced by 4. Here in your code what will happen is this : qsort(values, 5,sizeof(int),c2) i.e. c2 will be replaced by the a>b?a:b which will be a compilation error and also your macro is defined with arguments and you are just using c2 in code which is syntactically incorrect. Moreover qsort() calls the comparator function and this is the standard way it is defined. So, I don’t think we can modify anything such!!