记录详情

Compile Error

foo.c: In function 'm':
foo.c:5:9: error: expected ',' or ';' before 'for'
    5 |         for(int i=0;s[i]!=0;i++)
      |         ^~~
foo.c:5:23: error: 'i' undeclared (first use in this function)
    5 |         for(int i=0;s[i]!=0;i++)
      |                       ^
foo.c:5:23: note: each undeclared identifier is reported only once for each function it appears in
foo.c:5:32: error: expected ';' before ')' token
    5 |         for(int i=0;s[i]!=0;i++)
      |                                ^
      |                                ;
foo.c:5:32: error: expected statement before ')' token
foo.c:8:23: error: expected ';' before ':' token
    8 |                 a[1]++:
      |                       ^
      |                       ;
foo.c:68:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   68 |         if(temp=1)
      |            ^~~~
foo.c:70:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   70 |         if(temp=2)
      |            ^~~~
foo.c:72:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   72 |         if(temp=3)
      |            ^~~~
foo.c:74:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   74 |         if(temp=4)
      |            ^~~~
foo.c:76:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   76 |         if(temp=5)
      |            ^~~~
foo.c:78:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   78 |         if(temp=6)
      |            ^~~~
foo.c:80:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   80 |         if(temp=7)
      |            ^~~~
foo.c:82:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   82 |         if(temp=8)
      |            ^~~~
foo.c:84:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   84 |         if(temp=9)
      |            ^~~~
foo.c:86:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   86 |         if(temp=10)
      |            ^~~~
foo.c:88:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   88 |         if(temp=11)
      |            ^~~~
foo.c:90:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   90 |         if(temp=12)
      |            ^~~~
foo.c:92:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   92 |         if(temp=13)
      |            ^~~~
foo.c:94:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   94 |         if(temp=14)
      |            ^~~~
foo.c:96:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   96 |         if(temp=15)
      |            ^~~~
foo.c:98:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   98 |         if(temp=16)
      |            ^~~~
foo.c:100:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  100 |         if(temp=17)
      |            ^~~~
foo.c:102:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  102 |         if(temp=18)
      |            ^~~~
foo.c:104:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  104 |         if(temp=19)
      |            ^~~~
foo.c:106:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  106 |         if(temp=20)
      |            ^~~~
foo.c:108:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  108 |         if(temp=21)
      |            ^~~~
foo.c:110:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  110 |         if(temp=22)
      |            ^~~~
foo.c:112:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  112 |         if(temp=23)
      |            ^~~~
foo.c:114:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  114 |         if(temp=24)
      |            ^~~~
foo.c:116:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  116 |         if(temp=25)
      |            ^~~~
foo.c:118:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  118 |         if(temp=26)
      |            ^~~~
foo.c: In function 'main':
foo.c:125:9: warning: 'gets' is deprecated [-Wdeprecated-declarations]
  125 |         gets(s1);
      |         ^~~~
In file included from foo.c:1:
/nix/store/linb70pgp53f0kygxm5wk163dx22d681-glibc-2.37-45-dev/include/stdio.h:605:14: note: declared here
  605 | extern char *gets (char *__s) __wur __attribute_deprecated__;
      |              ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
6-9 哪个字母用得最多
语言
C
递交时间
2023-12-05 16:29:19
评测时间
2023-12-05 16:29:19
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes