I just wrote my first real bit of c code for an assignment: An enqueue and dequeue method for a linked list! (It's probably really horrible, but this was the first time I wrote c, so don't judge me too hard please D:)
2
5
it's not bad. One comment about your enqueue... What happens if matnum is smaller than the student at the head of the list?
1
1
Oh, huh, yea. I guess it'd need another check for current's matnum, not just current.next_student's matnum. Oh well, I already handed it in :P
1
Replying to @Ellpeck
I find, when writing these kinds of data structure manipulators, that a good approach is after writing it, try to break it. Testing isn't just about showing it works, but also showing that it doesn't not work, if you see what I mean :-) Soaryn your code!

May 17, 2018 ยท 10:48 AM UTC

1
Replying to @dsilverstone
no but see they gave us a set amount of instructions that are done to the list, and do you really expect the lazy tutor to actually add more tests to that rather than just test the code you wrote with those existing pre-made instructions
2