[C][homework]

It seems like someone else has already solved your problem, but I just wanted to add that you're making things a lot more complicated than it needs to be.

Take for example the part that counts the occurrence of each number. You don't need to do that many flow control statements, you also don't need to separate the counter and the presenter.

for(int i = 1; i <= 10; i++)
    {
        for(int j = 0; j < 1000; j++) //Linear search
        {
             if(array[j] == i)
                occurrences++;
        }
        printf("There are %d occurences of the number %d.\n", occurrences, i);
        occurrences = 0;
    }

What is the purpose of having two summation functions?

Since you've already solved your assignment, I might as well show you an alternate way to do it that significantly reduces the number of lines.

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main()
{
    int array[1000]; //Array
    srand(time(NULL)); //Random seed
    int average = 0; //Average value
    int occurrences = 0;

    for(int i = 0; i < 1000; i++) //Add random numbers
    {
            array[i] = rand() % 10 + 1;
            average += array[i];
    }

    for(int i = 1; i <= 10; i++)
    {
            for(int j = 0; j < 1000; j++) //Linear search
            {
                    if(array[j] == i)
                            occurrences++;
            }
            printf("There are %d occurences of the number %d.\n", occurrences, i);
            occurrences = 0;
    }

    printf("Average: %d\n", average/1000);
    return 0;
}

Example output:

There are 99 occurences of the number 1.
There are 112 occurences of the number 2.
There are 85 occurences of the number 3.
There are 104 occurences of the number 4.
There are 102 occurences of the number 5.
There are 103 occurences of the number 6.
There are 96 occurences of the number 7.
There are 105 occurences of the number 8.
There are 103 occurences of the number 9.
There are 91 occurences of the number 10.
Average: 5
/r/learnprogramming Thread Parent