Submission #00116
ソースコード
ステータス
項目 |
データ |
問題 |
0008 - 月火 |
ユーザー名 |
ei1710
|
投稿日時 |
2019-05-27 17:36:32 |
言語 |
C |
状態 |
Compile Error |
得点 |
0
|
ソースコード長 |
295 Byte |
最大実行時間 |
-
|
最大メモリ使用量 |
|
コンパイルメッセージ
./Main.c: In function ‘main’:
./Main.c:20:2: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
printf("%d\n",*(p+atoi(gets(s)));
^~~~~~
./Main.c:20:2: warning: incompatible implicit declaration of built-in function ‘printf’
./Main.c:20:2: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
./Main.c:2:1:
+#include <stdio.h>
./Main.c:20:2:
printf("%d\n",*(p+atoi(gets(s)));
^~~~~~
./Main.c:20:25: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration]
printf("%d\n",*(p+atoi(gets(s)));
^~~~
./Main.c:20:25: warning: passing argument 1 of ‘atoi’ makes pointer from integer without a cast [-Wint-conversion]
printf("%d\n",*(p+atoi(gets(s)));
^~~~~~~
In file included from /usr/include/features.h:361,
from /usr/include/stdlib.h:25,
from ./Main.c:1:
/usr/include/stdlib.h:284:1: note: expected ‘const char *’ but argument is of type ‘int’
__NTH (atoi (__const char *__nptr))
^~~~~
./Main.c:20:34: error: expected ‘)’ before ‘;’ token
printf("%d\n",*(p+atoi(gets(s)));
^
)
./Main.c:22:11: error: expected ‘;’ before ‘}’ token
return 0;
^
;
}
~
セット
テストケース