#include &lt;iostream&gt;    #include &lt;iterator&gt;    #include &lt;list&gt;    using namespace std;    int main &#40;&#41;     &#123;        list&lt;int&gt; mylist;        for &#40;int i = 0; i &lt; 5; i++&#41;             mylist.push_back &#40;i * 20&#41;;        list&lt;int&gt; :: iterator first = mylist.begin&#40;&#41;;        list&lt;int&gt; :: iterator last = mylist.end&#40;&#41;;        cout &lt;&lt; distance&#40;first, last&#41; &lt;&lt; endl;        return 0;    &#125;
A. 20
B. 100
C. 5
D. None of the mentioned
Answer:A
#include &lt;iostream&gt;    #include &lt;iterator&gt;    #include &lt;list&gt;    using namespace std;    int main &#40;&#41;     &#123;        list&lt;int&gt; mylist;        for &#40;int i = 0; i &lt; 5; i++&#41;             mylist.push_back &#40;i * 20&#41;;        list&lt;int&gt; :: iterator first = mylist.begin&#40;&#41;;        list&lt;int&gt; :: iterator last = mylist.end&#40;&#41;;        cout &lt;&lt; distance&#40;first, last&#41; &lt;&lt; endl;        return 0;    &#125;
A. 20 B. 100 C. 5 D. None of the mentioned
Explanation:In this program, We are printing the number of elements in the list by using distance method.