labs
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| labs [2017/02/17 21:45] – aboelaze | labs [2017/03/23 18:01] (current) – aboelaze | ||
|---|---|---|---|
| Line 78: | Line 78: | ||
| if you run the program the second time with book.dat as before, | if you run the program the second time with book.dat as before, | ||
| the input is {{: | the input is {{: | ||
| + | |||
| + | |||
| + | ===== LAB 6 ===== | ||
| + | |||
| + | Here is {{: | ||
| + | |||
| + | <fc red> | ||
| + | |||
| + | 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(" | ||
| + | |||
| + | fgets(s, sizeof(s), stdin); | ||
| + | |||
| + | sscanf(s, " | ||
| + | |||
| + | **records file** | ||
| + | |||
| + | {{: | ||
| + | |||
| + | **Input and output files** | ||
| + | |||
| + | {{: | ||
| + | |||
| + | **This is not input output samples, but will help you to be with testing** | ||
| + | |||
| + | This is a hash table with k=7 {{: | ||
| + | |||
| + | Here is for k=10 {{: | ||
| + | |||
| + | **Here is a solution for lab 6** {{: | ||
| + | |||
| + | |||
| + | ===== LAB 7 ===== | ||
| + | |||
| + | Here is {{: | ||
| + | |||
| + | **<fc red> The lab is due March 19 </ | ||
| + | |||
| + | |||
| + | |||
| + | ===== LAB 8 ===== | ||
| + | |||
| + | here is {{: | ||
| + | |||
| + | Due last day of classes | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
labs.1487367956.txt.gz · Last modified: by aboelaze
