Question: if itr 2 = 1 } vec.erase ( itr ) ; return; } What is true about this function when it is called on a

if itr 2=1
}
vec.erase (itr);
return;
}
What is true about this function when it is called on a Vector that contains only even integers?
The function will get caught in an endless loop.
The function will remove all integers and return.
The function will not change the Vector and return.
The function will remove all odd integers, leave all even integers, and return.
Given is the following function in C++ :
void remove_odds (Vector%2==1
 if itr 2=1 } vec.erase (itr); return; } What is true

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!