-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathF.cpp
More file actions
45 lines (34 loc) · 912 Bytes
/
Copy pathF.cpp
File metadata and controls
45 lines (34 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* FEOF example */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
FILE *fp = fopen("c:/Users/owner/Desktop/Program/in.txt", "a");
// for (int i=0; i<23; i++)
//fprintf(stdout,"%d\n",i);
// printf("%d", fp);
int a[23]={95};
// gets(a);
//a= fgets(1,1,fp);
char s[] ="HELLOWORLD";
if (feof(fp)) printf("end\n");
else printf ("no\n");
printf("%d\n", ftell(fp));
// fwrite(s,1,strlen(s),fp);
// printf("%s", fputs("Hello",fp));
// printf("%s", a);
printf ("know : %s\n", fp->_tmpfname);
fseek(fp, -5, SEEK_END);
printf("%d\n",ftell(fp));
printf ("know : %d\n", (fp->_file));
// printf ("know : %d\n", *(fp->_base));
//printf("HI: %d\n", ftell(fp));
// fseek (fp, -5, SEEK_CUR);
// printf("Hey: %d\n", ftell(fp));
// printf("WHY: %d\n", SEEK_END);
fclose(fp);
// getchar();
system("pause");
return 0;
}