Spring 2007, CS 403 FILE STRUCTURE


Assignment I (Even roll numbers like 2, 4, 6, .... ,34)

Write a program to implement a sequential file with variable-length records containing the following two types of records:
Record type 1: (student)
field name type length
roll char 8
name char 30
semester numeric 1
Record type 2:(employee)
field name type length
emp_code char 3
name char 30
designation char 10

Assignment II (odd roll numbers like 1, 3, 5, ...,35)

Write a program to implement a relative file to store records of the students of your class containing fields: roll, last name, first name and address. Take last name as the key field and use the hash function H(k) = M mod D, where k is the key field, M is the sum of the ASCII values of the characters in k and D is the divisor. Select an appropriate divisor. Also experiment with different divisors and see how performance is afftected by the divisor. Assume that only one record can be stored at one address location. Use linear probing for collision resolution.
Submission Date : 11-03-08

Back to my Home page