Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#define NOGRADEYET 0
#define ABESNT -1
typedef struct{
unsigned int nrm;
char nume[30];
unsigned char ans;
unsigned int grupa;
char fac[6];
char note[20];
unsigned char is;// indicator stare( art liber / art valid )
void main()
FILE* f,*g;
int nrart, cheie, a, i;
char numefr[20] = "..\\SR.dat"; // Aparitie in folderul solutie (automatizeaza la mutarea manuala)
char numeft[20] = "..\\Lista1025.txt";
int nrct;
f = fopen(numefr, "rb");
if (!f)
printf("\nNu se poate deschide fisierul %s", numefr);
g = fopen(numeft, "wt");
fprintf(g,"\t\tLista studentilor");
fprintf(g, "\n\nNrcrt Nr mat %s-29s Fac. A Grupa", "Nume si prenume");
fread(&x, sizeof(STUDENT), 1, f);
while (!feof(f))
if ( == 1)
fprintf(g, "\n%5d %5d %-29s %-5s %d %5d", ++nrart, x.nrm, x.nume, x.fac, x.ans, x.grupa);
fread(&x, sizeof(STUDENT), 1, f);
printf("\nLista se aflta in fisierul %s", numeft);
printf("\nGata, apasa o tasta...");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.