[프로그램] c
- 최초 등록일
- 2002.06.06
- 최종 저작일
- 2002.06
- 8페이지/ 한컴오피스
- 가격 1,500원
목차
없음
본문내용
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#define FILE_NAME "student.txt" //학생들데이터 파일
#define hash_table_size 100 //해시 테이블의 크기
//학생테이블의 구조체 선언
struct table {
int num; //학생테이블 인덱스
char major[20]; //학과
int level; //학년
int std_num; //학번
char name[10]; //학생이름
} student[21];
//해시 테이블의 구조체선언
struct h_table{
int num; //해시테이블의 인덱스
int key; //학생테이블의 인덱스
int std_num; //학번
char name[10]; //학생이름
} hash_table[hash_table_size];
int choice; //이름또는 학번검색하기위한 전역변수
void search_table(void);
int hash_name(char *name);
int hash_std_num(int num);
int hash_address(char *name, int num);
참고 자료
없음