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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!