Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- typedef struct eredmeny
- {
- char nev[ 33 ];
- char neptun[ 7 ];
- int pont[ 5 ];
- }ELEM;
- int main(int argc, char *argv[])
- {
- FILE *f;
- int i;
- f=fopen(argv[1], "rb");
- ELEM tmp;
- while(fread(&tmp,sizeof(ELEM),1,f))
- for (i=0; i!=5; i++)
- if (tmp.pont[i]==1)
- printf("%s (%s)", tmp.nev, tmp.neptun);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement