Monday, May 24, 2010

FS lab program corrections

You need to make these corrections in the programs (you might have taken the print outs):

1. First program is not satisfying the question. In case 2, take input from a file (and not stdin) and use getline for reading (and not >> operator).

2. In unpack method of RRN, variable length, primary index and secondary index programs, change the last statement from
p = strtok(NULL, "#"); strcpy(marks, p);
to
p = strtok(NULL, "\n"); strcpy(marks, p);

3. In the delete method in both the primary index and secondary index program, change the comment from
//we delete the record only in the index file
to
//we delete the record only in the record file

4. In the delete method in the linked list program, change the condition from
if(strcmp(first->usn, _usn) != 0) {
to
if(strcmp(first->usn, _usn) == 0) {

These are the updated programs except first one.

1 comment:

  1. yoooo man!

    thx a lot 4 ur great effort. ur tutorial helped me a lot and bcoz of dat only i got my output both d time.

    u rock man !!!!
    thx a lot once again .......

    ReplyDelete