Linux环境,问一个关于fseek的问题
代码如下:
#include<stdio.h>int main(void){ FILE *fp; int i,j; fp = fopen("tt","w"); for(i=0; i<10; i++) { j = fseek(fp,1L,SEEK_CUR); printf("%d\n",j); } return 0;}
The lseek() function shall allow the file offset to be set beyond the end of the existing data in the file. If data is later written at this point, subsequent reads of data in the gap shall return bytes with the value 0 until data is actually