foo.c: In function ‘main’:
foo.c:12:25: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char (*)[20]’ [-Wformat=]
12 | scanf("%s %d %d %C %C %d",&xingming,&qimo,&banji,&ganbu,&xibu,&lunwen);
| ~^ ~~~~~~~~~
| | |
| char * char (*)[20]
foo.c:12:34: warning: format ‘%C’ expects argument of type ‘wchar_t *’, but argument 5 has type ‘char *’ [-Wformat=]
12 | scanf("%s %d %d %C %C %d",&xingming,&qimo,&banji,&ganbu,&xibu,&lunwen);
| ~^ ~~~~~~
| | |
| int * char *
| %hhd
foo.c:12:37: warning: format ‘%C’ expects argument of type ‘wchar_t *’, but argument 6 has type ‘char *’ [-Wformat=]
12 | scanf("%s %d %d %C %C %d",&xingming,&qimo,&banji,&ganbu,&xibu,&lunwen);
| ~^ ~~~~~
| | |
| int * char *
| %hhd
foo.c:19:37: error: expected ‘;’ before ‘}’ token
19 | singal+=2000}
| ^
| ;
foo.c:20:37: warning: comparison between pointer and integer
20 | if(qimo >85 && xibu =="Y"){
| ^~
foo.c:20:37: warning: comparison with string literal results in unspecified behavior [-Waddress]
foo.c:22:39: warning: comparison between pointer and integer
22 | if(banji >80 && ganbu =="Y"){
| ^~
foo.c:22:39: warning: comparison with string literal results in unspecified behavior [-Waddress]
foo.c:26:27: error: assignment to ‘char’ from ‘char *’ makes integer from pointer without a cast [-Wint-conversion]
26 | p1=xingming;
| ^
foo.c:30:22: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘int *’ [-Wformat=]
30 | printf("%s\n%d\n%d\n",&p1,&max,&sum);
| ~^ ~~~~
| | |
| int int *
| %ls
foo.c:30:26: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘int *’ [-Wformat=]
30 | printf("%s\n%d\n%d\n",&p1,&max,&sum);
| ~^ ~~~~
| | |
| int int *
| %ls