foo.c: In function 'compare':
foo.c:43:6: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (i = n)
^
foo.c: In function 'main':
foo.c:12:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%c", &a[0]);
^~~~~~~~~~~~~~~~~~
foo.c:16:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%c", &a[i]);
^~~~~~~~~~~~~~~~~~
foo.c: In function 'compare':
foo.c:45:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
[Hydro](https://hydro.ac)提供评测服务