用指向指針的指針的方法對5個字符串排序並輸出。

#include <stdio.h> #include <string.h> #include<stdlib.h> void *sort(char **p) {char **q,**p1,*temp; for(q=p;q<p+4;q++) {for(p1=q+1;p1<p+5;p1++) if(strcmp(*q,*p1)>0) {temp=*q; *q=*p1; *p1=temp; } } re
相關文章
相關標籤/搜索