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
Replying to @Ellpeck
it's not bad. One comment about your enqueue... What happens if matnum is smaller than the student at the head of the list?

May 17, 2018 ยท 7:46 AM UTC

1
1
Replying to @dsilverstone
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
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!
1