#include<stdio.h> void main(){ //打开文件 FILE *fp; fp = fopen("test.txt", "r+"); if(fp == NULL){ printf("File open fail! "); } //写入数据 char wbuf[10] = "54321"; fwrite(wbuf, 5, 1, fp); //定位文件 fseek(fp, 0, SEEK_SET); //读取数据 char rbuf[10]; fread(rbuf, 5, 1, fp); rbuf[5] = '