#include &lt;iostream&gt;    #include &lt;vector&gt;    using namespace std;    int main &#40;&#41;    &#123;        vector&lt;int&gt; myvector &#40;5&#41;;        int* p = myvector.data&#40;&#41;;        *p = 10;        ++p;        *p = 20;        p&#91;2&#93; = 100;        for &#40;unsigned i = 0; i &lt; myvector.size&#40;&#41;; ++i&#41;            cout &lt;&lt; ' ' &lt;&lt; myvector&#91;i&#93;;        return 0;    &#125;
A. 10 20 0 100 0
B. 10 20 0 100
C. 10 20 0
D. 10 20
Answer:A
#include &lt;iostream&gt;    #include &lt;vector&gt;    using namespace std;    int main &#40;&#41;    &#123;        vector&lt;int&gt; myvector &#40;5&#41;;        int* p = myvector.data&#40;&#41;;        *p = 10;        ++p;        *p = 20;        p&#91;2&#93; = 100;        for &#40;unsigned i = 0; i &lt; myvector.size&#40;&#41;; ++i&#41;            cout &lt;&lt; ' ' &lt;&lt; myvector&#91;i&#93;;        return 0;    &#125;
A. 10 20 0 100 0 B. 10 20 0 100 C. 10 20 0 D. 10 20
Explanation:In this program, We are allocating the values to the vector and unallocated values are left as zero.