Documente Academic
Documente Profesional
Documente Cultură
h>
#include<conio.h>
typedef struct
char denumire[20];
float pret;
int cant[12];
char is;
}Produs;
FILE* f, * g;
Produs p;
int i, n = 0;
g = NULL;
f = fopen(numeBin, "rb");
else {
g = fopen(numeText, "w");
while (!feof(f))
if (p.is)
fclose(f);
fclose(g);
int main()
ListareBinToText("Produse.dat", "FisText01.txt");
return 0;
#include<stdio.h>
#include<conio.h>
char nume[30];
int an;
int grupa;
int n;
int note[15];
}Student;
int main()
{
FILE* f, * g;
char s1[20];
Student s;
g = NULL;//initializare pointer
gets_s(s1, 20);
f = fopen(s1, "rb");
else {
gets_s(s1, 20);
g = fopen(s1, "w");
if (!g)printf("eroare");
else {
n = 0;
while (!feof(f))
freadb(s, f);
}
fclose(f);
fclose(g);
_getch();
return 0;
#include<stdio.h>
#include<conio.h>
char nume[30];
int an;
int grupa;
int n;
int note[15];
}Student;
int main()
FILE* f;
Student s;
int i;
char s1[20];
f = fopen(s1, "wb");
if (!f)printf("eroare");
else {
printf("\nDati nr matricol");
scanf("%d", &s.nr);//!!
while (!feof(stdin))//CTRL+Z
printf("\nNume stud:");
scanf("%s", &s.nume);
printf("\nAn:");
scanf("%d", &s.an);
printf("\nGrupa:");
scanf("%d" , &s.grupa);
scanf("%d", &s.n);
printf("Nota[%d]=", i + 1);
scanf("%d", &s.note[i]);
scanf("%d", &s.nr);
}
fclose(f);
_getch();
return 0;