Test for closing of files

Test for closing of files

by Frieder Loch -
Number of replies: 0

Hello everyone,

we teach our students to call fclose(File* f) after finishing writing from or reading to a file in C. However, we find no way to test whether a student actually used this function in their CodeRunner answer. At the moment we can validate whether the student has read the correct content form or whether the stuent has written the correct content to a file.

I wanted to ask whether there is a possibility to check the code of the student for the existence of a function call.

Thank you and kind regards,
Frieder