Question: PLease help c++ struct supplierType { string name; int supplierID; }; struct applianceType { supplierType supplier; string modelNo; float cost; }; applianceType applianceList[25]; Which of

PLease help c++

struct supplierType

{

string name;

int supplierID;

};

struct applianceType

{

supplierType supplier;

string modelNo;

float cost;

};

applianceType applianceList[25];

Which of following statements correctly initializes the cost of each appliance to 0?

1. applianceList.cost = 0;

2. applianceList.cost[25] = 0;

3. for (int j = 1; j < 25; j++)

applianceList.cost[j] = 0;

4. for (int j = 0; j < 25; j++)

applianceList.cost[j] = 0;

Thanks!

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!