记录详情

Runtime Error

/in/foo.c: In function 'main':
/in/foo.c:19:13: warning: iteration 5 invokes undefined behavior [-Waggressive-loop-optimizations]
   19 |         a[c]=e;
      |         ~~~~^~
/in/foo.c:17:20: note: within this loop
   17 |         for(int e;c<=5;c++){
      |                   ~^~~
/in/foo.c:21:9: warning: array subscript 5 is above array bounds of 'int[5]' [-Warray-bounds]
   21 |         printf("%d %d %d %d %d\n",a[1],a[2],a[3],a[4],a[5]);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.c:5:13: note: while referencing 'a'
    5 |         int a[5];
      |             ^
/in/foo.c:27:29: warning: 't' may be used uninitialized [-Wmaybe-uninitialized]
   27 |                         a[j]=t;
      |                         ~~~~^~
/in/foo.c:23:13: note: 't' was declared here
   23 |         int t;
      |             ^
# 状态 耗时 内存占用
#1 Runtime Error 1ms 284.0 KiB

信息

递交者
类型
自测
语言
C
递交时间
2025-11-22 14:49:17
评测时间
2025-11-22 14:49:17
评测机
分数
0
总耗时
1ms
峰值内存
284.0 KiB