find a number in a file and delete its line in C

Multi tool use


find a number in a file and delete its line in C
I want to delete the data of a student by his personal ID, I want to search it by ID and delete the line where the ID was found.
I don't think it's working with fgets(), what else?
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.