int fun(char* p, char* q) {
int i = 0;
while (*p == *q) {
if (*p == '\0')return 0;
else p++, q++;
}
return *p - *q;
}
void main() {
int n = fun("goods", "people");
printf("%d", n);
}
void fun(char* w,int m) {
char t, * p1,*p2;
p1 = w;
p2 = w+m-1;
while (p1 < p2)
{
t = *p1;
*p1 = *p2;
*p2 = t;
p1++;p2--;
}
}
void main()
{
char a[] = "ABCDEFG";
fun(a,strlen(a));
puts(a);
}