Solved

Consider the Following Statements: Struct SupplierType
\quad String Name; \quad Int SupplierID;
};
Struct ApplianceType

Question 31

Multiple Choice

Consider the following statements: struct supplierType
{
\quad string name;
\quad int supplierID;
};
struct applianceType
{
\quad supplierType supplier;
\quad string modelNo;
\quad double cost;
};
applianceType applianceList[25];
Which of the following statements correctly initializes the cost of each appliance to 0?


A) applianceList.cost = 0;
B) applianceList.cost[25] = 0;
C) for (int j = 1; j < 25; j++)
applianceList.cost[j] = 0;
D) for (int j = 0; j < 25; j++)
applianceList.cost[j] = 0;

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents