#include <tscope.h>
#define NPRACTWORDS 20
#define N5WORDS 75
#define N7WORDS 105
char wpract[NPRACTWORDS][20];
char w5[N5WORDS][20];
char w7[N7WORDS][20];
void readwords()
{
int i;
FILE *fp;
fp = fopen("practice.txt", "r");
if (fp == NULL) {
printf("error opening practice.txt");
exit(EXIT_FAILURE);
}
for (i = 0; i < NPRACTWORDS; i++)
fscanf(fp, "%s", wpract[i]);
fclose(fp);
fp = fopen("five.txt", "r");
if (fp == NULL) {
printf("error opening five.txt");
exit(EXIT_FAILURE);
}
for (i = 0; i < N5WORDS; i++)
fscanf(fp, "%s", w5[i]);
fclose(fp);
fp = fopen("seven.txt", "r");
if (fp == NULL) {
printf("fout bij openen seven.txt");
exit(EXIT_FAILURE);
}
for (i = 0; i < N7WORDS; i++)
fscanf(fp, "%s", w7[i]);
fclose(fp);
}
#ifndef VPW_DATA_C
int main()
{
readwords();
int i;
for (i = 0; i < NPRACTWORDS; i++)
printf("oef %03d: %s\n", i, wpract[i]);
for (i = 0; i < N5WORDS; i++)
printf("five %03d: %s\n", i, w5[i]);
for (i = 0; i < N7WORDS; i++)
printf("seven %03d: %s\n", i, w7[i]);
return 0;
}
END_OF_MAIN();
#endif