Here is the answer..

![27 int main() 28 29 30 31 32 University unilistM[1000]-( PURDUE, purdue university, IN,38000), {UTSA, University Of](http://img.homeworklib.com/questions/e49620f0-a87b-11ea-a33e-e7c09340906b.png?x-oss-process=image/resize,w_560)
Here is the OUTPUT:
Here is the Code:
#include<stdio.h>
#include<string.h>
typedef struct
{
char szCode[7];
char szName[50];
char szState[3];
int iStudentCnt;
}University;
float avgStudents(University uniListM[1000],int tot,char
str[100])
{
int i,count=0;
int no_of_students=0; //for total no_of_students in all
universities
for(i=0;i<tot;i++)
{
no_of_students+=uniListM[i].iStudentCnt; //count the
no_of_students
if(strcmp(uniListM[i].szState,str)==0) //if university is TX then
add students.
{
//printf("%s ",uniListM[i].szState);
count+=uniListM[i].iStudentCnt;
}
}
float avg=(float)count/no_of_students; //calculating avg
return avg; //return the avg value
}
int main()
{
University uniListM[1000]={
{"PURDUE","purdue university","IN",38000},
{"UTSA","University Of Texas at San
Antonio","TX",30000},
{"LSU","Lousiana State University","LA",25000},
{"IU","Indian University","IN",20000},
{"UT","University Of Texas at
Austin","TX",35000},
{"UTA","University Of Texas at
Arlingtoin","TX",28000}
};
int iUnivCnt=6;
printf("The average of enrolled students in University
of Texas are : %f ",avgStudents(uniListM,6,"TX"));
//here we use %f because avg is float value
}
If you have any doubts please COMMENT...
If you understand the answer please give THUMBS UP....
Must be coded in C. (30 pts) Show the function avgStudents which functionally returns the average...
write a C++program to analyze a small subset of the data that has been collected. See file universities.txt .Use precisely seven parallel arrays: one for name of university, one for state, one for city, one for yearly tuition, one for enrollment, one for average freshman retention, and one for the percent of students who graduate with in six years. Note that the percentage of student accepted is not stored.An output file is opened in main() and remains open until the...
Please!!! need help asap!!!! write a C++program to analyze a small subset of the data that has been collected. See file universities.txt .Use precisely seven parallel arrays: one for name of university, one for state, one for city, one for yearly tuition, one for enrollment, one for average freshman retention, and one for the percent of students who graduate with in six years. Note that the percentage of student accepted is not stored.An output file is opened in main() and...