I pulled out an old program from school and started updating it because I was bored. It may be because I was using a dinosaur of a compiler when I was in school, but now every time I try to run the program it either crashes before starting, crashes after I select option 1, or crashes my computer right out.

If anyone can see something that I can't, let me know. I have a big problem finding problems in code that I write :P

(Note: I cut out most of it and only included the parts that are troublesome due to space constraints)
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

/*struct definitions*/
typedef struct{
  char First[16];
  char Last[16];
}Cust_Name;

typedef struct{
  Cust_Name Name;
  long int Number;
  char Line1[26];
  char Line2[26];
  char Line3[26];
  char Line4[26];
  char City[16];
  char State[3];
  long int Zip;
  int Num_Lines;
}Cust_Info;

/*function prototypes*/
void Read(Cust_Info *x);
//void Search(Cust_Info *x);
//void Update(Cust_Info *x);
//void Sort(Cust_Info *x);
//void Print(Cust_Info *x);

int main(){
  Cust_Info Rec[30];
  int selection;

  do{
    printf("1. Read customer information data file.\n"
	   "2. Search for customer record.\n"
	   "3. Update customer information data file.\n"
	   "4. Sort customer records.\n"
	   "5. Print mailing labels.\n"
	   "6. End Program.\n"
	   "Choose an option (1-6): ");
    scanf("%d", &selection);
    switch(selection){
      case 1:
        Read(Rec);
	break;
      case 2:
        //Search(Rec);
	break;
      case 3:
        //Update(Rec);
	break;
      case 4:
        //Sort(Rec);
	break;
      case 5:
	//Print(Rec);
	break;
      case 6:
        exit(0);
	break;
      default:
	printf("Invalid selection\n");
	break;
    }
  }
  while(selection!=6);
  return 0;
}

/*read in the data from a file*/
void Read(Cust_Info *x){
  FILE *in;
  int i, j, k;

  /*open the file for input-check for errors*/
  if((in=fopen("a:\Supply.dat", "r"))==NULL){
    printf("Error opening file!");
    exit(0);
  }

  /*input data*/
  i=0;
  do{
    fscanf(in, "%ld%s%s%s%s%ld%d", &x[i].Number, &x[i].Name.Last,
	       &x[i].Name.First, &x[i].City, &x[i].State, &x[i].Zip,
	       &x[i].Num_Lines);
    /*change state to upper case if not already*/
    for(j=0; j<2; j++){
      if(x[i].State[j] >= 'a' && x[i].State[j] <= 'z'){
	x[i].State[j] += 'A'-'a';
      }
    }
    for(j=0; j<26; j++){
      x[i].Line1[i] = '\0';
      if(x[i].Num_Lines > 1) {x[i].Line2[i] = '\0';}
      if(x[i].Num_Lines > 2) {x[i].Line3[i] = '\0';}
      if(x[i].Num_Lines > 3) {x[i].Line4[i] = '\0';}
    }
    /*Read the first address line (not optional)*/
    j=-1;
    do{
      j++;
      fscanf(in, "%c", &x[i].Line1[j]);
      if(x[i].Line1[j]=='\n'){
	x[i].Line1[j]='\0';
      }
    }
    while(x[i].Line1[j]!='\0');
    /*read the second line if present*/
    j=-1;
    if(x[i].Num_Lines > 1){
      do{
	j++;
	fscanf(in, "%c", &x[i].Line2[j]);
	if(x[i].Line1[j]=='\n'){
	  x[i].Line2[j]='\0';
	}
      }
      while(x[i].Line2[j]!='\0');
    }
    /*read the third line if present*/
    j=-1;
    if(x[i].Num_Lines > 2){
      do{
	j++;
	fscanf(in, "%c", &x[i].Line3[j]);
	if(x[i].Line3[j]=='\n'){
	  x[i].Line3[j]='\0';
	}
      }
      while(x[i].Line3[j]!='\0');
    }
    /*read the last line if present*/
    j=-1;
    if(x[i].Num_Lines > 3){
      do{
	j++;
	fscanf(in, "%c", &x[i].Line4[j]);
	if(x[i].Line4[j]=='\n'){
	  x[i].Line4[j]='\0';
	}
      }
      while(x[i].Line4[j]!='\0');
    }
  }
  while(!feof(in));
}
-Prelude