I've read other questions regarding this problem but I still don't understand how I would create a prototype for both of these functions. I am currently using Xcode.
The two functions that are showing problems are exit and system.
#include <stdio.h>
void main()
{
    FILE *fp;
    char ename[30], ans;
    int t_score;
    fp = fopen("/Users/mmu/Desktop/Program Design/Assignment/Assignment 3/Assignment 3/surveyIn.txt", "a");
    if (fp == 0)
    {
        printf("File could not be opened!\nProgram stopped.\n");
        exit(1);
    }
    else
    {
        do
        {
            fflush(stdin);
            printf("Name: ");
            gets(ename);
            printf("Test mark: ");
            scanf("%d", &t_score);
            fprintf(fp, "%s %d\n", ename, t_score);
            fflush(stdin);
            printf("Do you want to continue (Y/N)? \n");
            scanf("%c", &ans);
        }
        while (ans=='y' || ans=='Y');
    }
    fclose(fp);
    system("pause");
}
The output is this:
Name: warning: this program uses gets(), which is unsafe.
Paul
Test mark: 50
Do you want to continue (Y/N)? 
sh: pause: command not found
Program ended with exit code: 0
 
    