C
- 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)
- Tommy6
- @tyottyoworks
- ___shanon
- わたやん
- @KorekaraSEDB
- @kariya_mitsuru
- @ciniml
- @beam2d
- @grafi_tt
- @nekketsuuu
- LouiS0616
- @volanja
- 大鎌広
- むてら
- ガチKGB
- 三重野賢人
x
29
1
2
3
4
5
6
7
int main ()
8
{
9
// line buffer
10
FILE *fp;
11
char type;
12
uint64_t address;
13
14
fp = fopen("XSBENCH.t", "r");
15
if(!fp)
16
{
17
printf("file not found\n");
18
return 1;
19
}
20
21
for(int i = 0; i<5; ++i)
22
{
23
fscanf(fp, " %c %" SCNx64, &type, &address);
24
printf("%c %" PRIx64 " \n", type, address);
25
}
26
fclose(fp);
27
return 0;
28
}
29
$ gcc prog.c -Wall -Wextra -std=c99 -pedantic
Start
W 7fff6c5b7b80 R 7fff6c5b7c48 W 7fff6c5b7b88 R 7fff6c5b7c20 W 7fff6c5b7b90
0
Finish