ExamVeda
Login
Home
C plus plus miscellaneous
?

What will be the output of the following C++ code?
#include <iostream>
#include <functional>
#include <algorithm>
using namespace std;
int main ()
{
    int numbers[] = {10, -20, -30, 40, -50};
    int cx;
    cx = count_if ( numbers, numbers + 5, bind2nd(less<int>(), 0) );
    cout << cx;
    return 0;
}

Answer & Solution
Correct Answer: Option C
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.