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:
|
#include <stdio.h>
#include <stdlib.h>
/*
* MultipleChoice
*/
int main()
{
/*Prototypen*/
void Musterloesung(char *);
char Ergebniss[21];
void Student(char *);
/*Variablen*/
char Loesung [2000];
char Matrnummer[100];
Musterloesung(Ergebniss);
Student(Loesung);
return 0;
}
void Musterloesung(char *Ergebniss)
{
FILE *erg;
erg = fopen("exam.dat" , "r");
int a;
for (a=0; a<20; a=a+1)
{
Ergebniss[a]=fgetc (erg);
}
printf ("%s", Ergebniss);
}
void Student (char *Loesung)
{
char Matrnummer[100];
char Loesungstud[50];
FILE *erg;
erg = fopen("exam.dat" , "r");
while((fgets(erg, 100, stdin)) != NULL)
printf("%s", erg);
}
|