#include?lt;stdio.hgt;
#define?MAX?100
char?*lookupLongestStr(char?pch[][MAX], int?n, int?*maxlength)
{
int?c[4]={0}, t=0, i=0, j=0;
char?*p;
for(i=0;ilt;n;i)
{
for(j=0;pch [i][j]!='\0';j )
c[i]=j;
}
*maxlength=c[0 ];
for(i=1;ilt;n;i)
{
if(c[i]gt;*maxlength)
{
*maxlength=c[i];
p=pch[i];
}
}
return?p;
}
int?main()
{ char?pch[4][MAX]={ "wasdwasdwasd", "werewer", "gddfgasdfddffsadffa", "uiuio"}; int?maxlength=0, i=0; char?*p; p=lookupLongestStr(pch, 4, amp; maxlength); la palabra es s y la longitud es d\n", p, maxlength); return?0;
}