Junior — Senior
What text will appear in the console after running the program
livecode
Task condition
It is necessary to predict what result will be output to the console when executing the following C++ code.
#include <algorithm>
#include <iostream>
#include <list>
bool IsEven(int value)
{
return value % 2 == 0;
}
void ProcessAndShow()
{
std::list<int> numbers = {0, 1, 2, 3, 4, 5};
std::remove_if(numbers.begin(), numbers.end(), IsEven);
std::cout << numbers.front() << numbers.size() << std::endl;
}
int main()
{
ProcessAndShow();
return 0;
}