First I want to say this is a HOMEWORK assignment. I am looking for help but I don't want to cheat. With that said, I'm looking to understand the CONCEPTS that I have wrong, and the DIRECTION I need to go in order to fix this. Please help in any way you can without the possibility of cheating. I will do my best to make this post as clear and to the point as possible. Thanks!

The code is at the end of this post. Please note that it is rather lengthy.

/**************************************************
The Assignment:
Create a structure to hold student names and averages. The structure should contain first name, last name, and an integer grade average.


Write a program that will do the following:
1) Create an array of pointers to these student structures.
2) Prompt the user for names and averages
3) After you get the student's info, use malloc to provide the memory to store the info
4)Place the address of the student, returned by malloc, into the pointer array.
5)AFTER the user indicates there are no more students:
-Search data for the highest and lowest grade
-Print name and grade for highest grade
-Print name and grade for lowest grade
-Print average of all grades entered


Program should allow storage of up to 25 students.
Use proper modularization to divide your program into logical functions.
*************************************************/
If it is needed I can post the error messages I get when I try to compile the program.

In summary, I beleive my errors to be the following:
  1. Incorrect syntax with pointers
  2. Incorrect use of malloc
  3. Incorrect syntax with structures
The Code:
Code:
#include "stdafx.h"
#include <string.h>


#define SIZE 25


int enterStudents (int);
void searchData (int, int, int);
int calculateAvg (int, int);
void printData (int, int, int);


struct student
{
    char firstName;
    char lastName;
    int average;
};


int main()
{
    int pointArray[SIZE], high[3], low[3];
    int forCounter = 0, studentCounter, avgGrade; 


    for (forCounter = 0; forCounter < 25; forCounter++)
        pointArray[forCounter] = 0;


    studentCounter = enterStudents(pointArray);


    searchData(pointArray, high, low);


    avgGrade = calculateAvg(studentCounter, pointArray);


    printData(avgGrade, high, low);




    return 0;
}




int enterStudents (int ePointArray[SIZE])
{
    char tempFname[20], tempLname[20], yesNo[2] = "y";
    int tempAvg, counter = 0;
    int *studPtr;
    
    struct student aStud={"\0", "\0", 0};




    while( counter < SIZE && strcmp(yesNo, "y")==0)
    {
        printf(" Enter first name: ");
        scanf("%s", tempFname);


        printf(" Enter last name: ");
        scanf("%s", tempLname);


        printf(" Enter grad average:");
        scanf("%d", tempAvg);


        strcpy(aStud.firstName, tempFname);
        strcpy(aStud.lastName, tempLname);
        aStud.average = tempAvg;


        studPtr = malloc(sizeof(struct aStud));


        ePointArray[counter] = &studPtr;


        counter++;


        printf("/n");
        printf(" Do you have more students? yes or no:");
        scanf("%s", yesNo);
    }


    return counter;


}

void searchData (int sPointArray[SIZE], int sHigh[3], int sLow[3])
{
    int searchCounter = 0;


    while( searchCounter = 0)
    {
        if( *sPointArray[searchCounter].average > *sPointArray[searchCounter+1].average)
        {
            sHigh[0] = &sPointArray[searchCounter].firstName;
            sHigh[1] = &sPointArray[searchCounter].lastName;
            sHigh[2] = &sPointArray[searchCounter].average;
        }
        
        if( *sPointArray[searchCounter].average < *sPointArray[searchCounter+1].average)
        {
            sLow[0] = &sPointArray[searchCounter].firstName;
            sLow[1] = &sPointArray[searchCounter].lastName;
            sLow[3] = &sPointArray[searchCounter].average;
        }


        searchCounter++;
    }


}


int calculateAvg( int totalStudents, int avgPointArray[SIZE])
{
    int sum = 0;
    int avgCounter;
    double overallAvg;


    for( avgCounter = 0; avgCounter < totalStudents; avgCounter++)
        sum = sum + *avgPointArray[avgCounter].average;


    overallAvg = sum/totalStudents;


    return overallAvg;
}




void printData (int pAverage, int pHigh[3], int pLow[3])
{
    printf(" Highest Grade: %s %s %d", *pHigh[0], *pHigh[1], *pHigh[3]);
    printf("/n");
    printf(" Lowest Grade: %s %s %d", *pLow[0], *pLow[2], *pLow[3]);
    printf("/n");
    printf(" Average Grade: %d",pAverage);


}