I am required to run my compiled program using my account in university's HPCC center. My program should output the results in a text file, so I am using
FILE *fp = fopen("Users/Tiff/Documents/output.txt", "w+");
You should be able to use the following code:
FILE *fp = fopen("output.txt", "w+");
The file "output.txt" would be in the current directory.