Answer:
Following are the code in the C Programming Language:
/*-----code is here-------*/
murderCount=0; //set count of murder to 0
for (int i=0; i<NPRECINCTS;i++) //set for loop
murderCount += allPrecincts[i].murders; //traverse the precincts to murder
Step-by-step explanation:
In the following code, we use structure through C Programming Language in which we write the following code of structure.
- Firstly, we set the integer data type variable "murderCount" and assign the value 0.
- Then, we set the for loop in which we traverse all the array type variable "allPrecincts" then, add to the variable "murderCount".