From c9ece6227e5fb5a848dabcca4e690174d2bfa0aa Mon Sep 17 00:00:00 2001 From: "1354388639@qq.com" <1354388639@qq.com> Date: Tue, 8 Jan 2019 17:46:58 +0800 Subject: [PATCH] first commit --- 文件保存题库以及读取题库.c | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 文件保存题库以及读取题库.c diff --git a/文件保存题库以及读取题库.c b/文件保存题库以及读取题库.c new file mode 100644 index 0000000..2051279 --- /dev/null +++ b/文件保存题库以及读取题库.c @@ -0,0 +1,39 @@ +#include +#include +#include +#include +#define TRUE 1 +#define ERROR 0 +#define MAX 30 +typedef int Status; +typedef struct{ + char option1[30],option2[30],option3[30],option4[30],subject[150]; + char result; +}TestNode; +TestNode Testquestions[MAX]; + +Status SaveNode(int N) //ѽṹ鱣浽ļѡ⿼⡱ +{ + int i; + FILE *fp; + if((fp=fopen("ѡ⿼","wb"))==NULL) + return ERROR; + for(i=0;i