Question Authors' Forum

Test for closing of files

 
Picture of Frieder Loch
Test for closing of files
by Frieder Loch - Wednesday, 20 June 2018, 11:22 PM
 

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