Home / MCQ Bank / Computer
Computer Plus Plus Miscellaneous

What will be the output of the following C++ code? #include <iostream> #include <vector> using namespace std; int main () { vector<int> a (3, 0); vector<int> b (5, 0); b = a; a = vector<int>(); cout << "Size of a " << int(a.size()) << '\n'; cout << "Size of b " << int(b.size()) << '\n'; return 0; }

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option A • Size of a 0 Size of b 3

Related Computer Questions

What is the value of the following Python expression? bin(0x8) How does Hadoop's Transparent Data Encryption (TDE) enhance security in HDFS? ________ button helps to connect data from spread sheet or other application What happens if a pair is not initialized? If ListBox is the class of System.Windows.Forms namespace. Then, the correct way to create an object of ListBox class is?