#include <stdio.h>
#include <string.h>

struct {
  char      student[40];
  short int homework;
  short int points;
} ann_smith;

int main()
{
  FILE *fd;
    
  /* read record back into C heap */
  fd = fopen("ann_smith.dat", "r");
  fread(&ann_smith, sizeof(ann_smith), 1, fd);
  fclose(fd);
  
  printf("Student: %s, Homework: %d, Points: %d\n",
    ann_smith.student, ann_smith.homework, ann_smith.points);
    
  return 0;
}
