Question states:
The statement vector< vector< int > > matrix(100, vector (50, 100) ) declares: …
This should result in compile time error as the vector(50, 100) should be vector(50, 100). Please look into the matter and tell whether i am correct or not. As it is showing another option as true.
C++ STL Quiz- II -Q5 Vector STL#5 -Doubt
It is showing first option as the correct one:
vector < int > (50, 100) declares a vector X of type int with 50 elements each initialized to 100 and matrix consists of 100 vectors of type int each equal to X.
but this option itself says vector < int > (50, 100)
So i think there’s a typo in the question
The web browser is considering the < int > without spaces between < and int and > as some HTML tag.
So its there but is not showing on the page. Please have a look in the screenshot and fix it .