-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.c
37 lines (28 loc) · 829 Bytes
/
test.c
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
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct
{
char *str;
} Strings;
int main()
{
FILE *p1 = fopen("q.dat", "rb");
Strings s1;
// s1.str = "Who is the founder of C language?\n";
// fwrite(&s1, sizeof(Strings), 1, p1);
// s1.str = "Who is the founder of C++ language?\n";
// fwrite(&s1, sizeof(Strings), 1, p1);
// s1.str = "Who is the founder of Linux language?\n";
// fwrite(&s1, sizeof(Strings), 1, p1);
// s1.str = "Who is the founder of Go language?\n";
// fwrite(&s1, sizeof(Strings), 1, p1);
// fread(&s1, sizeof(Strings), 1, p1);
fclose(p1);
// fclose(p2);
return 0;
}
// Who is the founder of C language?
// Who is the founder of C++ language?
// Who is the founder of Linux language?
// Who is the founder of Go language?