C语言查找求解
程序代码:/* Note:Your choice is C IDE */
#include "stdio.h"
#include "string.h"
typedef struct node //定义结点
{char a[10];
}Qnode;
Qnode *shuru(Qnode s[]) //输入10个串
{ int i;
for(i=0;i<10;i++)
gets(s[i].a);
return s;
}
char * bidaxiao(Qnode s[],char *b)
{ int i;
strcpy(b,s[0].a);
for(i=0;i<10;i++)
if(s[i].a<s[i+1].a)
strcpy(b,s[i+1].a);
return b;
}
void main()
{ char b[10],*c;
Qnode *p,s[10];
int i;
p=s;
shuru(p);
c=bidaxiao(p,b);
puts(c);
}
输入10个字符串 查找最长的串并输出。。。。大家帮忙看看哪里错了。。谢谢









