
Read it right next to your computer.
Book version bitter C
#include <stdio.h>
int main(void)
{
FILE* fp;
int dat[3] = { 10, 20, 30 };
fp = fopen("file.dat", "wb");
fwrite(&dat, sizeof(dat), 1, fp);
fclose(fp);
return 0;
}
番号 | 名前 | テストの平均点 |
---|---|---|
1 | 野比のびBold | 0 |
2 | 源静香 | 90 |
3 | 剛田武 | 40 |
4 | 骨川スネ夫 | 7 |
#include <stdio.h>
int main(void)
{
FILE* fp;
fp = fopen("test.csv", "w");
fprintf(fp, "番号,名前,テストの平均点\n");
fprintf(fp, "1,野比のびBold,0\n");
fprintf(fp, "2,源静香,90\n");
fprintf(fp, "3,剛田武,40\n");
fprintf(fp, "4,骨川スネ夫,70,\n");
fclose(fp);
return 0;
}
Learning C language through suffering (Kushi C) is
This is the definitive introduction to the C language.
It systematically explains the basic functions of the C language.
The quality is equal to or higher than commercially available books.