c语言学习(文件)练习43

需求:将10000以二进制的形式存入文件中
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int main() {
	int a = 10000;
	FILE* pf = fopen("D:\\桌面\\test.txt", "wb");
	fwrite(&a, 1, 1, pf);
	fclose(pf);
	pf = NULL;
	return 0;
}

  

 

posted @ 2023-11-16 17:08  小菜阿跃  阅读(14)  评论(0)    收藏  举报