What does the for_each algorithm return?
Explanation
The for_each algorithm has a unique feature - it returns its function object. Other algorithms cannot do this. This means that you can get information about the state of the function object by checking the return value of the for_each algorithm.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes