adplus-dvertising
frame-decoration

Question

What is the output of this program?
    #include <iostream>
    #include <algorithm>
    #include <vector>
    using namespace std;
    int main ()
    {
        int myints[] = {10, 20, 30, 30, 20, 10, 10, 20};
        int mycount = count (myints, myints + 8, 10);
        cout << mycount;
        vector<int> myvector (myints, myints + 8);
        mycount = count (myvector.begin(), myvector.end(), 20);
        cout << mycount;
        return 0;
    }

a.

33

b.

44

c.

22

d.

None of the mentioned

Answer: (a).33

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?