0
I am having problems with a code using fscanf, Can anyone please help?
I have written a basic c program that keeps record of students using file handling, but I'm unable to make a successful program to read that data and print on console. I am attaching the program I need help with!! https://code.sololearn.com/c0Pt1RZctiW5/?ref=app https://code.sololearn.com/cSV07Dt5YEAu/?ref=app
4 Respuestas
+ 2
Anand Dwivedi , it's working elsewhere or not? there is some limitations of sololearn code playground (like it doesn't allow interactive user input)... if it's not working anymore on other platform, do let us know and someone might look into it in detail for you to help..
+ 2
Anand Dwivedi additionally, if you have opened file, it's a good practice to close it once you are done reading the same..
+ 1
Anand Dwivedi okay..as you mentioned it reads infinity, I hope you have got proper file pointer..
I dont have any other platform as of now, but I predict culprit is &name in fscanf.. can you try to pass name instead of &name and share your results?
0
Thanks Ketan Lalcheta, it's not working any-where I'm unable to make a program to read the details I input . The fscanf reads infinitely. Thanks
https://code.sololearn.com/c0Pt1RZctiW5/?ref=app