Answer:
Replace/* Your code goes here */ with
for(int count = 0; count<4; count++)
{
if(keysList[count] > 40)
{
cout<<itemsList[count]<<" ";
}
}
Explanation;
The solution provides used an iteration to loop from the first toll the last.
The index of an array starts at 0
The index of the last element is calculated as total element - 1
Since the count of the array is 4, the last index is 4 - 1 = 3.
In the solution provides, a count integer variable is declared to iterate through the keysList array
Each element of keysList array is tested to know if it's greater than 40.
If yes the corresponding element in itemsList is printed followed by a space
Else
Nothing is done
The codes segment goes thus
for(int count = 0; count<4; count++)
{
if(keysList[count] > 40)
{
cout<<itemsList[count]<<" ";
}
}