The headings in the table below are:
Works - How well your program worked. I ran them all on my machine after compiling them with gcc and looked at the output. It is possible that your program worked for you but not for me but this is not a sign of a good program.
Docs & Style- Documentation. You should have used comments for documentation, if you didn't then you lost up to 2 marks. If your program was badly written you may have lost another 2 marks.
Sub - I may have taken marks off for plagiarism or late submission, the comments should explain why. I took off lots of marks for copying, if you want these back, come and explain your program to me.
Total - Marks out of 10.
Common mistakes were:
You can't say if(string=="-1"); even though the compiler accepts it, it doesn't do what you think.
Use comments even if you don't know what you are doing.
Remember to zero a counter before you use it each time.
|
ID |
Works |
Docs & |
Sub |
Total |
Comments |
|
00006939 |
|
|
|
|
|
|
00041327 |
|
|
|
10 |
|
|
00060046 |
|
-2 |
|
8 |
No comments |
|
00063878 |
|
|
|
|
|
|
00065722 |
|
|
|
10 |
|
|
00071668 |
-1 |
|
|
9 |
It is not a good idea to read the file as chars and you should really check for the -1 |
|
00071692 |
|
-2 |
|
8 |
No comments |
|
00075027 |
-1 |
-2 |
|
7 |
No comments, didn't compile, but ok otherwise |
|
00076120 |
|
|
|
|
|
|
00081221 |
-1 |
|
|
9 |
Output format not correct |
|
00087599 |
|
|
|
|
|
|
00093009 |
-1 |
-2 |
|
7 |
Not correct because you add up 9 chars instead of 8 |
|
00101680 |
-3 |
|
|
7 |
i is not set to 0 in your loop, output not correct. |
|
00102458 |
|
-1 |
|
9 |
Comments could be better |
|
00116361 |
|
|
|
10 |
|
|
00123455 |
|
|
|
|
|
|
00128392 |
|
|
|
10 |
|
|
00130362 |
-1 |
-2 |
|
7 |
Would work if you printed the group, no comments |
|
00179841 |
|
|
|
10 |
|
|
00213934 |
|
|
|
|
|
|
00256285 |
|
|
|
10 |
|
|
00271993 |
|
|
|
10 |
|
|
00287636 |
-1 |
-2 |
|
7 |
No comments, doesn't check for -1 |
|
00297739 |
|
-2 |
|
8 |
No comments |
|
00300136 |
|
-2 |
|
8 |
No comments |
|
01003763 |
-1 |
-2 |
|
7 |
No comments, doesn't print \n after each line |
|
01019562 |
|
|
|
10 |
|
|
01019724 |
|
|
|
10 |
|
|
01019996 |
|
|
|
10 |
|
|
01025449 |
|
|
|
10 |
|
|
01028251 |
|
|
|
10 |
|
|
01031740 |
|
|
|
|
|
|
01039784 |
|
|
|
|
|
|
01046918 |
|
|
|
|
|
|
01048007 |
|
-2 |
|
8 |
No comments |
|
01053744 |
-1 |
|
|
9 |
Should be for (i=0;i<8;i++), otherwise groups are wrong. |
|
01066897 |
|
-2 |
|
8 |
No comments |
|
01069756 |
|
|
|
10 |
|
|
01070274 |
|
|
|
|
|
|
01072129 |
|
-2 |
|
8 |
No comments |
|
01076833 |
-1 |
-2 |
|
7 |
Only does alternate ids, no comments |
|
01079514 |
-3 |
-1 |
|
6 |
i is not set to 0 in your loop, output not correct, loop test not correct |
|
01080105 |
-1 |
-2 |
|
7 |
No comments, doesn't check for -1 |
|
01080210 |
-4 |
-3 |
|
3 |
No comments, does not compile |
|
01080444 |
|
|
|
10 |
|
|
01080946 |
-4 |
-3 |
|
3 |
Does not compile |
|
01085700 |
|
|
|
10 |
|
|
01086383 |
|
|
|
10 |
|
|
01098675 |
|
|
|
10 |
|
|
01099388 |
|
|
|
10 |
|
|
01101145 |
|
|
|
10 |
|
|
01103598 |
|
|
|
10 |
|
|
01104322 |
-1 |
-2 |
|
7 |
Does not print the id, no comments |
|
01106058 |
-1 |
|
|
9 |
Should be while (i!=8), output is not correct |
|
01115162 |
|
|
|
10 |
|
|
01116878 |
|
|
|
10 |
|
|
01124978 |
|
|
|
10 |
|
|
01125605 |
|
|
|
|
|
|
01125761 |
|
|
|
10 |
|
|
01129236 |
-1 |
|
|
9 |
Only does alternate ids |
|
01130447 |
|
|
|
10 |
|
|
01143042 |
|
|
|
10 |
|
|
01148591 |
-4 |
-2 |
|
4 |
id not big enough for string, total not set to zero in loop. |
|
01157604 |
|
|
|
10 |
|
|
01162721 |
-1 |
|
|
9 |
Only does alternate ids |
|
01167642 |
-1 |
|
|
9 |
Should be for (t=0; t<8; t++), output not correct |
|
01175300 |
|
|
|
10 |
|
|
01186159 |
|
|
|
10 |
|
|
01188372 |
|
|
|
10 |
|
|
01198718 |
|
|
|
10 |
|
|
01218999 |
|
|
|
10 |
|
|
01221248 |
|
|
|
|
|
|
01225863 |
|
-1 |
|
9 |
Needs more comments |
|
01239953 |
|
|
|
|
|
|
01240552 |
-2 |
-2 |
|
6 |
Sum is not set to 0 in your loop, output is incorrect, no comments |
|
01240919 |
|
|
|
|
|
|
01244930 |
|
|
|
|
|
|
01252461 |
-4 |
-3 |
|
3 |
No comments, sum not set to 0, only first id read |
|
01257358 |
|
|
|
10 |
|
|
01276360 |
-1 |
|
|
9 |
Doesn't check for -1 |
|
01279300 |
|
|
|
10 |
|
|
01279394 |
-1 |
|
|
9 |
Doesn't check for -1 |
|
01286129 |
-3 |
|
|
7 |
Use strcmp for string comparisons, doesn't do what was required. |
|
01288393 |
|
|
|
10 |
|
|
01290592 |
|
|
|
10 |
|
|
01290835 |
|
|
|
10 |
|
|
01292951 |
-2 |
-2 |
|
6 |
No comments, output not correct |
|
01309824 |
-2 |
|
|
8 |
Num not set to 0 in loop, output not correct |
|
01321366 |
|
-1 |
|
9 |
Comments could be better |
|
01321706 |
|
|
|
10 |
|
|
01322141 |
|
-2 |
|
8 |
No comments |
|
01324543 |
-2 |
|
-4 |
4 |
Group not set to 0, output incorrect. |
|
01328409 |
|
|
|
10 |
|
|
01329073 |
|
|
|
10 |
|
|
01340670 |
|
|
|
|
|
|
01342622 |
|
|
|
10 |
|
|
01342967 |
|
|
|
10 |
|
|
01350706 |
-1 |
|
|
9 |
Crashes when testing for -1 |
|
01352997 |
-1 |
-2 |
|
7 |
No comments, doesn't check for -1 |
|
01353489 |
|
|
|
10 |
|
|
01354515 |
|
|
|
10 |
|
|
01361775 |
|
|
|
|
|
|
01363131 |
|
|
|
10 |
|
|
01375059 |
|
-1 |
|
9 |
Comments could be better |
|
01389580 |
|
-2 |
|
8 |
No comments |
|
01391917 |
|
|
|
10 |
|
|
01394193 |
|
-2 |
|
8 |
|
|
01400355 |
|
|
|
10 |
|
|
01400388 |
|
|
|
10 |
|
|
01400428 |
|
-2 |
|
8 |
No comments |
|
01402560 |
|
|
|
10 |
|
|
01417916 |
|
|
|
10 |
|
|
01420690 |
|
-2 |
|
8 |
No comments |
|
01424238 |
|
-2 |
|
8 |
No comments |
|
01441566 |
|
-2 |
|
8 |
No comments |
|
01444220 |
-3 |
|
|
7 |
Sum=0 and printf should be outside your inner loop. |
|
01446726 |
-4 |
-3 |
|
3 |
Does not compile |
|
01448919 |
|
|
|
10 |
|
|
01452940 |
|
|
|
10 |
|
|
01455206 |
|
|
|
10 |
|
|
01460129 |
|
|
|
10 |
|
|
01460641 |
|
-2 |
|
8 |
No comments |
|
01461346 |
|
-1 |
|
9 |
Comments could be better |
|
01463349 |
|
-1 |
|
9 |
Comments could be better |
|
01470167 |
|
|
|
|
|
|
01474022 |
|
|
|
10 |
|
|
01475282 |
-2 |
|
-4 |
4 |
Too similar to 01324543,group not set to 0, output incorrect. |
|
01478117 |
-1 |
|
|
9 |
Doesn't check for -1 |
|
01478354 |
|
|
|
10 |
|
|
01479784 |
|
|
|
10 |
|
|
01481908 |
|
|
|
10 |
|
|
01482866 |
-2 |
-2 |
|
6 |
Id not big enough, program crashes, no documentation |
|
01484389 |
-1 |
-2 |
|
7 |
Should be fscanf(f,"%s",id); both places, no documentation |
|
01484443 |
|
|
|
|
|
|
01486497 |
-3 |
-2 |
|
5 |
There are 8 digits, not 9, digit is not defined correctly, your method doesn't work, no comments |
|
01492082 |
-1 |
-2 |
|
7 |
No comments, doesn't check for -1 |
|
01492179 |
-3 |
-2 |
|
5 |
Only does first id, x not set to zero in loop, check for -1 not correct, no comments. |
|
01494317 |
-2 |
-2 |
|
6 |
Sum not set to zero, output not correct, no comments. |
|
01497243 |
|
|
|
10 |
|
|
01498290 |
|
|
|
10 |
|
|
01499056 |
-1 |
|
|
9 |
Doesn't check for -1 |
|
01501194 |
|
|
|
10 |
|
|
01501259 |
|
|
|
10 |
|
|
01502123 |
|
-2 |
|
8 |
No comments |
|
01502506 |
|
-2 |
|
8 |
No comments |
|
01503723 |
|
|
|
|
|
|
01504800 |
|
-2 |
|
8 |
No comments |
|
01506749 |
|
|
|
10 |
|
|
01511734 |
|
-2 |
|
8 |
No comments |
|
01515640 |
|
-2 |
|
8 |
No comments |
|
01517015 |
|
|
|
10 |
|
|
01521640 |
|
|
|
10 |
|
|
01522604 |
|
|
|
10 |
|
|
01522868 |
|
-2 |
|
8 |
No comments |
|
01525298 |
|
|
|
|
|
|
01525867 |
|
-1 |
|
9 |
Comments could be better |
|
01528467 |
|
|
|
|
|
|
01530471 |
|
|
|
|
|
|
01531859 |
-4 |
-4 |
|
2 |
Id not big enough, id not read, total not set to zero, no loop. |
|
01532235 |
|
|
|
|
|
|
01533258 |
|
|
|
|
|
|
01534173 |
-1 |
|
|
9 |
t never set to zero |
|
01535978 |
|
|
|
10 |
|
|
01538667 |
-3 |
-3 |
|
4 |
Does not compile, lots of errors, no comments |
|
01539655 |
|
|
|
10 |
|
|
01541854 |
|
-2 |
|
8 |
No comments |
|
01541862 |
|
|
|
10 |
|
|
01546279 |
|
|
|
10 |
|
|
01550101 |
-3 |
-3 |
|
4 |
Does not compile, lots of errors, no comments |
|
01554972 |
-1 |
-2 |
|
7 |
Should be char id[9]; to allow for NUL, no comments |
|
01555227 |
|
|
|
|
|
|
01557947 |
|
|
|
|
|
|
01558978 |
-1 |
-1 |
|
8 |
Total not set to 0 in loop, comments could be better |
|
01561804 |
-1 |
-2 |
|
7 |
K not set to 0 in loop, no comments |
|
01562517 |
|
|
|
|
|
|
02001454 |
|
|
|
10 |
|
|
02003147 |
|
-2 |
|
8 |
No comments |
|
02004143 |
|
-2 |
|
8 |
needs much better comments |
|
02004151 |
|
|
|
10 |
|
|
02004178 |
|
|
|
10 |
|
|
02004332 |
|
|
|
|
|
|
02005069 |
|
|
|
|
|
|
02009579 |
|
|
|
10 |
|
|
02012928 |
|
|
|
10 |
|
|
02015209 |
|
-1 |
|
9 |
Comments could be better |
|
02023539 |
-1 |
|
|
9 |
Doesn't check for -1 |
|
02026546 |
-1 |
-2 |
|
7 |
Doesn't check for -1, no comments |
|
02058995 |
-1 |
-2 |
|
7 |
Doesn't check for -1, no comments |
|
02060434 |
|
|
|
10 |
|
|
02060892 |
|
|
|
10 |
|
|
02066017 |
|
|
|
|
|
|
02073749 |
|
-1 |
|
9 |
Comments could be better |
|
02080486 |
|
|
|
|
|
|
02095297 |
|
|
|
|
|
|
02179083 |
-1 |
-2 |
|
7 |
Sum not set to zero in loop, no coments |
|
08558965 |
|
-1 |
|
9 |
Comments could be better |
|
92123103 |
|
|
|
10 |
|
|
94014948 |
|
|
|
10 |
|
|
96122705 |
|
|
|
|
|
|
97011001 |
|
|
|
|
|
|
97062153 |
|
|
|
10 |
|
|
98024719 |
|
|
|
|
|
|
98074880 |
-1 |
|
-1 |
9 |
Doesn't check for -1, late |
|
98160442 |
|
|
|
|
|
|
98272348 |
|
|
|
10 |
|
|
99008458 |
|
|
|
|
|
|
99039477 |
|
|
|
10 |
|
|
99059184 |
-3 |
-2 |
|
5 |
Does not compile, lots of errors, comments could be better |
|
99075457 |
|
|
|
10 |
|
|
99082291 |
-1 |
|
|
9 |
Should be int id[8]; this defines id[0]..id[7] |
|
99086645 |
|
|
|
|
|
|
99105356 |
-3 |
|
|
7 |
Total not set to zero, id not printed correctly, output not correct. |
|
99112972 |
|
|
|
10 |
|
|
99114096 |
|
|
|
|
|
|
99208490 |
-1 |
-2 |
|
7 |
Doesn't check for -1 correctly, no comments |
|
99219394 |
|
|
|
|
|