#include<stdio.h>
#include<string.h>
int main()
{
char *buffer1="aaa",*buffer2="bbb",*buffer3="ccc";
int pos;
pos=strcmp(buffer1,buffer2);
if(pos>0)
{
printf("2>1\n");
}
else
{
printf("1>2\n");
}
pos=strcmp(buffer2,buffer3);
if(pos>0)
{
printf("2>3\n");
}
else
{
printf("3>2\n");
}
return 0;
}
转载于:https://www.cnblogs.com/wsq724439564/p/3258175.html