使用fseek移动到文件中的位置:
FILE *f = fopen( "file.name", "r+b" ); fseek( f, 3, SEEK_SET ); // move to offest 3 from begin of file unsigned char newByte = 0x67; fwrite( &newByte, sizeof( newByte ), 1, f ); fclose( f );