#include #include #include struct ogrenci { char isim[100]; int not[2]; }; struct ogrenci ogrenciOlustur() { struct ogrenci kayit; printf("ogrenci adini giriniz"); scanf("%s",kayit.isim); printf("\n"); printf("ogrencinin fizik notunu giriniz:"); scanf("%d",&kayit.not[0]); printf("\n"); printf("ogrencinin programlama notunu giriniz:"); scanf("%d",&kayit.not[1]); printf("\n"); return kayit; } const void* printOgrenci(struct ogrenci x) { printf("%s",x.isim); printf("%d",x.not[0]); printf("%d",x.not[1]); } int main() { FILE *f1; f1=fopen("deneme.txt", "r"); struct ogrenci ogrenci1=ogrenciOlustur(); struct ogrenci ogrenci2=ogrenciOlustur(); printf("\n"); fprintf(f1,"Ilk ogrenci bilgileri:\n"); fwrite(printOgrenci(ogrenci1),sizeof(printOgrenci(ogrenci1)),1,f1); fprintf(f1,"Ikinci ogrenci bilgileri:\n"); fwrite(printOgrenci(ogrenci2),sizeof(printOgrenci(ogrenci2)),1,f1); fclose(f1); return 0; }