Thank you for replying!
I get the same result when I run my program as root.
And to clarify, I am doing this for a school assignment. I had to make a module that creates a /proc file entry when it is initialized. The next step, which I am stuck on, is to have a user program write and read to/from the /proc file.
I thought that perhaps fopen didn't work because /proc is virtual. Or maybe I need to set permissions on the /proc file when I create it?