Given the following code, what will the output be? void Extr…

Given the following code, what will the output be? void ExtractValues(const vector &src, vector &out, int threshold){ int i = 0; while (i < src.size()) { if (src[i] > threshold) out.push_back(i); i++; }}int main(){ vector numbers; numbers.push_back(2); numbers.push_back(4); numbers.push_back(6); numbers.push_back(12); numbers.push_back(1); numbers.push_back(8); numbers.push_back(7); vector results; ExtractValues(numbers, results, 4); for (unsigned int i = 0; i < results.size(); i++) cout

The following function intends to sum the integers given a m…

The following function intends to sum the integers given a minimum/maximum value. For example, calling the function with (1,4) results in 1+2+3+4 -> 10.What, if anything, is wrong? #include int sum_range(int low, int high){ int s = 0; for(int i = low; i < high; i++) s += i; return s;}int main() { std::cout

The following function intends to sum the integers given a m…

The following function intends to sum the integers given a minimum/maximum value. For example, calling the function with (1,4) results in 1+2+3+4 -> 10.What, if anything, is wrong? #include int sum_range(int low, int high){ int s = 0; for(int i = low; i < high; i++) s += i; return s;}int main() { std::cout