What does the for_each algorithm return?
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
Sign Up Now
or Subscribe for future quizzes