Question: #include msp.h #include #define N 5 struct student{ int eng; int math; char name[20]; }; void main(void) { int i; struct student data[]={ {72, 58,JO},
#include "msp.h"
#include
#define N 5
struct student{
int eng;
int math;
char name[20];
};
void main(void)
{
int i;
struct student data[]={
{72, 58,"JO"},
{82, 79, "MO"},
{62, 39,"Edgar"},
{82, 88, "Po"},
{82, 88, "NWO"}
};
}
Add the following features to this code:
1.Add forth element to structure that will contain sum of eng and math. You must initialize it as 0 in array.
2.This element must be filled inside array using for loop
3.Print the above array in console window of CCS. You must use for loop.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
