Add code to a file I did not make

I got a textbook with a link to a test program file and I want to make a change to the file how do I find it and view it so I can edit it? I can build and run, but I am not sure how to see the code.