Q:

'=': left operand must be l-value - Looking to use an Array within C Language

I am trying to get the user to input specific values into an array, and get "Total" back of all the integers. Here are the specific parameters. 

Main() asks the user to enter the size of the array
Main() asks the user to enter the random values
Main() calls other worker functions and displays the results
Worker functions should match these specs: 

o   getTotalAndAverage()
takes int array and size, total and average by reference - returns a void
I'm only trying to do the total piece as of now, just to understand what I'm executing incorrectly. Here is my code:
#include <stdio.h>
#include <stdlib.h>

void getTotalandAvg(int array1[], int size, int* tot, int* avg);

int main() {
    int size, input, avg;
    int total;
    int array1[10000];
    printf("Please Enter a Size: ");
    scanf_s("%d", &size);

    for (int i = 0; i < size; i++) {
        printf("Please Enter Value: ");
        scanf_s("%d", &input);
        array1[i] = input;
    }
    getTotalandAvg(array1, size, &total, &avg);
    printf("%d", total);

    system("pause");
    return 0;
}

void getTotalandAvg(int array1[], int size, int* tot, int* avg) {
    int input = 0;
    for (int i = 0; i < size; i++) {
         array1[i] + input = *tot;
    }

}

A:

The C assignment operator, =, assigns the result obtained by evaluating its right-hand operand to the object designated by its left-hand operand.  It follows that the expression serving as its left-hand operand must in fact designate an object -- i.e. it must identify storage, which is what it means to be an "lvalue".  In fact, that term comes from exactly this requirement: the 'l' is short for "left", as in the left operand of an assignment expression.
The problematic statement is this one:
            array1[i] + input = *tot;

The left-hand operand of = is array1[i] + input, which is a valid expression, but not an lvalue.  You cannot assign to it, just like you cannot assign to 1 + 2 or x * y.
It's unclear what you actually want to do here, but from the function name I'd guess that you want either
            input += array1[i];

or
            *tot += array1[i];

or both.

