Vidyalelo
C++ Programming · Q84

C++ miscellaneous

Programming · C++ Programming · question 84

Q84

What will be the output of the following C++ code? #include #include #include using namespace std; int main () vector v = 4,2,10,5,1,8; sort(v.begin(), v.end()); if (binary_search(v.begin(), v.end(), 4)) cout << "found. "; else cout << "not found. "; return 0;

A.
found.
Answer
B.
not found.
C.
Error
D.
Segmentation fault

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board