int fun(char a[], char b[]) { int len_a = strlen(a); int len_b = strlen(b); if (len_a > len_b) return 1; if (len_a < len_b) return -1; for (int i = 0; i < len_a; i++) { if (a[i] > b[i]) return 1; if (a[i] < b[i]) return -1; } return 0; }