֪ Ŀ Lib Ƶ iProcess γ ֤ ѯ Modeler   Code  
Ա   
Ҫ
 
 

CԽ̳
CVSװ
CԵһ
CԳִ
Cprintf()scanf()
C
CԹؼ
C
CԿ
Cif-else
Cswitch
Cdo-whileѭ
Cwhileѭ
Cforѭ
Cbreak
Ccontinue
Cgoto
Cֵͨú
CԵݹ
CԴ洢
C
C
CԶά
CԽ鴫ݸ
Cָָ
Cgets()puts()
Cstrlen()
Cstrcpy()
Cstrcat()
Cstrcmp()
Cstrrev()
Cstrlwr()
Cstrupr()
CԽṹ
CԽṹ
CԽṹǶ
C
ļ
Cfprintf()fscanf()
Cfputc()fgetc()
Cfputs()fgets()
Cfseek()
Crewind()
Cftell()
Ԥ
CԤָ
C#includeָ
C#defineָ
C#undefָ
C#ifdefָ
C#ifndefָ
C#ifָ
C#errorָ
C#pragmaָ
 
 

Cfseek()
127
2  
 

fseek()ڽļָΪָƫڽдλõļ

fseek()﷨

int fseek(FILE *stream, long int offset, int whence)

fseek()3whenceֱֵΪSEEK_SETSEEK_CURSEEK_END

ʾ

һԴļfseek-file.cʾ -

#include <stdio.h>
void main() {
FILE *fp;
fp = fopen("myfile.txt", "w+");
fputs("This is yiibai tutorial\n", fp);
fseek(fp, 7, SEEK_SET);
fputs("maxsu", fp);
fclose(fp);
}

ִʾ󣬴myfile.txt½ -

This ismaxsuai tutorial

 


Ծ֧ǵĹҵ

10Ԫ 50Ԫ





֤룺 ֤,?ˢ֤



127
2