Author
anonymous
almost 4 years ago
Language
C
Compiler
gcc 11.1.0
Options
Warnings
C99
-pedantic
Author
anonymous
almost 4 years ago
$ gcc prog.c -Wall -Wextra -std=c99 -pedantic
prog.c: In function 'main':
prog.c:7:5: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
7 | scanf("%[^\n]%*c", str[i]);
| ^~~~~
prog.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main()
prog.c:7:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
7 | scanf("%[^\n]%*c", str[i]);
| ^~~~~
prog.c:7:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
prog.c:9:8: warning: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
9 | if(strcmp(str[i],"end")==0) break;
| ^~~~~~
prog.c:1:1: note: include '<string.h>' or provide a declaration of 'strcmp'
+++ |+#include <string.h>
1 | int main()
prog.c:17:5: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
17 | printf("%s\n", str[j]);
| ^~~~~~
prog.c:17:5: note: include '<stdio.h>' or provide a declaration of 'printf'
prog.c:17:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
prog.c:17:5: note: include '<stdio.h>' or provide a declaration of 'printf'
8 6
adsasda das dasd
dddd
asd sda
dasdas
Exit Code:
0