C++ CPP
C++ Institute Certified Professional Programmer (CPP-22-02)
Cpp Cpp Binary SearchEnglish
Exam overviewPractice session
What does this code print? #include <iostream> #include <vector> #include <algorithm> int main() { std::vector<int> v = {1, 3, 5, 7, 9}; auto it = std::lower_bound(v.begin(), v.end(), 5); std::cout << (it - v.begin()) << ' ' << *it; }
Loading your practice session…