Hi. Im new to programming and to this website and i need help with one of my assignments. The instructions for the assignment are to "write a program that uses an array of student structures to answer inquiries. Using a menu-driven user interface, provide inquiries that report a student's score, average, or grade. A fourth menu option provides all data for a requested student, and a fifth prints a list of student IDs and names". My code runs but when it does, i keep getting an error and i definitely dont know what's wrong with it. Please any help will be appreciated. oh and sorry that my code is so long...that's the only way that i know how to do it. Thanks.
Here's my code:
/* Janice Flores
COP 2220 - Online
Summer 2008
Prof. Enger
Ch 12 - Project 40
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
// Global Declarations
typedef struct
{
int id[5];
char name[5];
int quiz1[5];
int quiz2[5];
int quiz3[5];
int quiz4[5];
int exam[5];
} STUDENT;
void menu(int option);
void studentAverage(double average);
char scoreToGrade (int score);
int studentid;
int main (void)
{
// Local Declarations
STUDENT student;
int option, average, score;
menu(option);
// Statements
student.id[0] = 1234;
student.id[1] = 2134;
student.id[2] = 3124;
student.id[3] = 4532;
student.id[4] = 4678;
student.name[0] = "Julie Adams";
student.name[1] = "Harry Smith";
student.name[2] = "Tuan Nguyen";
student.name[3] = "Jorge Gonzalez";
student.name[4] = "Amanda Trapp";
student.quiz1[0] = 52;
student.quiz1[1] = 90;
student.quiz1[2] = 100;
student.quiz1[3] = 11;
student.quiz1[4] = 20; …