C
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
- voluntas
- @ignis_fatuus
- ブン
- @Linda_pp
- 清楚なC++メイドBOT
- @tzik_tack
- 長谷川一輝
- wraith13
- @jj1bdx
- @cpp_akira
- 安藤敏彦
- @srz_zumix
- Siv3D
- takezoh
- まろ
- @okdshin
- @hnokx
- @ishidakei
- @take_cheeze
- TAKEI Yuya
- @mumumu
- I (@wx257osn2)
- @tyottyoworks
- ___shanon
- わたやん
- @KorekaraSEDB
- @kariya_mitsuru
- @ciniml
- @beam2d
- @grafi_tt
- @nekketsuuu
- LouiS0616
- @volanja
- 大鎌広
- むてら
- ガチKGB
x
44
int n=0, lungString=0, vov=0, scanString=0,trovato=0, m=0;
1
2
3
4
5
6
7
int conta(char frase[MAX][MAX], int dim, int word);
8
9
int main()
10
{
11
int word =0, dimSottString=0, n=0;
12
char pagina[MAX];
13
14
15
FILE* fp;
16
17
scanf("%s", pagina);
18
fp = fopen(pagina, "r");
19
fscanf(fp, "%d", &word);
20
21
char frase[MAX][MAX];
22
23
24
for (int i = 0; i < word; i++){
25
fscanf(fp, "%s", frase[i]);
26
}
27
28
fclose(fp);
$ gcc prog.c -Wall -Wextra -std=gnu11
Start
prog.c: In function 'main': prog.c:11:31: warning: variable 'n' set but not used [-Wunused-but-set-variable] 11 | int word =0, dimSottString=0, n=0; | ^ prog.c: In function 'conta': prog.c:41:11: warning: unused variable 'sottString' [-Wunused-variable] 41 | char sottString[MAX][MAX]; | ^~~~~~~~~~ prog.c:40:59: warning: unused variable 'm' [-Wunused-variable] 40 | int n=0, lungString=0, vov=0, scanString=0,trovato=0, m=0; | ^ prog.c:40:48: warning: unused variable 'trovato' [-Wunused-variable] 40 | int n=0, lungString=0, vov=0, scanString=0,trovato=0, m=0; | ^~~~~~~ prog.c:40:35: warning: unused variable 'scanString' [-Wunused-variable] 40 | int n=0, lungString=0, vov=0, scanString=0,trovato=0, m=0; | ^~~~~~~~~~ prog.c:40:28: warning: unused variable 'vov' [-Wunused-variable] 40 | int n=0, lungString=0, vov=0, scanString=0,trovato=0, m=0; | ^~~ prog.c:40:14: warning: unused variable 'lungString' [-Wunused-variable] 40 | int n=0, lungString=0, vov=0, scanString=0,trovato=0, m=0; | ^~~~~~~~~~ prog.c:40:9: warning: unused variable 'n' [-Wunused-variable] 40 | int n=0, lungString=0, vov=0, scanString=0,trovato=0, m=0; | ^ prog.c:38:16: warning: unused parameter 'frase' [-Wunused-parameter] 38 | int conta(char frase[MAX][MAX], int dim,int word){ | ~~~~~^~~~~~~~~~~~~~~ prog.c:38:37: warning: unused parameter 'dim' [-Wunused-parameter] 38 | int conta(char frase[MAX][MAX], int dim,int word){ | ~~~~^~~ prog.c:38:45: warning: unused parameter 'word' [-Wunused-parameter] 38 | int conta(char frase[MAX][MAX], int dim,int word){ | ~~~~^~~~
Segmentation fault
Finish