Final answer:
The correct statement to initialize the cost of each appliance to 0 in an array of structures is 'applianceList[i].cost = 0;' using a for loop to iterate through each element of the array.
Step-by-step explanation:
The question pertains to the initialization of an array of structures in C++. To correctly initialize the cost of each appliance to 0 in the array applianceList, you would need to use a loop to iterate through each element and set the cost for each one. The correct option is:
C. applianceList[i].cost = 0;
To implement this, you could use a for loop like so:
for(int i = 0; i < 25; i++) { applianceList[i].cost = 0; }
This loop goes through each index of the applianceList array and initializes the cost field to 0 for each applianceType object.