User Tools

Site Tools


labs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
labs [2017/02/28 16:05] aboelazelabs [2017/03/23 18:01] (current) aboelaze
Line 83: Line 83:
  
 Here is {{:lab_6.pdf|Lab 6}} Here is {{:lab_6.pdf|Lab 6}}
 +
 +<fc red>**The student names are 50 characters or less ** </fc>
  
 Due midnight Sunday March 5 Due midnight Sunday March 5
 +
 +**Now few pointers:**
 +
 +You will read from the standard input, the number k followed by names. If you use scanf to read K, then use fgets to read names (it might contain spaces, so you can not use scanf easily), you will have a problem getting rid of the newline after the number k.
 +
 +I would suggest to use fgets t read both, then use sscanf to read k from the string you read.
 +
 +So, instead of
 +
 +scanf("%d", &k);   you can use
 +
 +fgets(s, sizeof(s), stdin);
 +
 +sscanf(s, "%d", &k);
 +
 +**records file**
 +
 +{{:records.txt|records.txt}}
 +
 +**Input and output files**
 +
 +{{:l6_in1.txt|}} and {{:l6_out1.txt|}} for the given file records.txt
 +
 +**This is not input output samples, but will help you to be with testing**
 +
 +This is a hash table with k=7 {{:det7.txt|}} it shows the hash table with the records mapped to the different lists, the records are <name, final_mark> the fial mark is between two parenthesis.
 +
 +Here is for k=10 {{:det10.txt|}}
 +
 +**Here is a solution for lab 6** {{:l6.c|L6.c}}
 +
 +
 +===== LAB 7 =====
 +
 +Here is {{:lab_7.pdf|lab 7}}
 +
 +**<fc red> The lab is due March 19  </fc>**
 +
 +
 +
 +===== LAB 8 =====
 +
 +here is {{:lab_8.pdf|Lab 8}}
 +
 +Due last day of classes
 +
 +
 +
 +
 +
 +
  
  
  
  
labs.1488297940.txt.gz · Last modified: 2017/02/28 16:05 by aboelaze