問答題寫出下列程序的輸出結(jié)果#include#includevoidmain(){char*a[3]={"morning","afternoon","evening"},*t;inti,j,k=0;for(j=0;j<2;j++){k=j;for(i=j+1;i<2;i++)if(strcmp(a[k],a[i])>0)k=i;t=a[k];a[k]=a[j];a[j]=t;}for(i=0;i<3;i++)printf("%c\n",*a[i]);}

您可能感興趣的試卷

你可能感興趣的試題