帮忙看看 输入三个字符串,按从小到大输出
要求输入三个字符串,按从小到大顺序输出
#include <stdio.h> #include <stdlib.h> #include <string.h> char list[3][11]; int main(void) { int x; for (x = 0; x < 3; x++) scanf("%10s", list[x]); qsort(list, 3 , sizeof(list[0]), (void*)strcmp); for (x = 0; x < 3; x++) printf("%s\n", list[x]); return 0; }