adplus-dvertising
frame-decoration

Question

What is the output of this program?
    #include <iostream>
    #include <vector>
    using namespace std;
    int main ()
    {
        vector<int> myvector;
        myvector.push_back(78);
        myvector.push_back(16);
        myvector.front() += myvector.back();
        cout << myvector.front() << '\n';
        return 0;
    }

a.

78

b.

16

c.

94

d.

None of the mentioned

Answer: (c).94

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?

Similar Questions

Discover Related MCQs

Q. What is the use of adapter in STL in c++?

Q. Which is used to iterate over container?

Q. What does the function objects implement?

Q. What are the two advantage of function objects than the function call?

Q. Which header is need to be used with function objects?

Q. Which are instances of a class with member function operator() when it is

Q. How many parameters does a operator() in a function object shoud take?

Q. How does a sequence of objects are accessed in c++?

Q. How many parameters are present in mismatch method in non-sequence modifying algorithm?

Q. What will happen in ‘all_of’ method if the range is empty?

Q. To what kind of elements does non-modifying sequence algorithm can be applied?

Q. Pick out the incorrect method in non-modifying sequence algorithm?

Q. What is the use of middle parameter in rotate method?

Q. What kind of object is modifying sequence algorithm?

Q. How the sequence of objects can be accessed?

Q. How many kind of operation can be applied to transform method in c++?

Q. What operator is used to remove the dupplicates in the range?

Q. What is meant by sequence point?

Q. Pick out the correct statement about sequence point.

Q. In sequence point, how will the overloaded operators behave like?