#include &lt;iostream&gt;    #include &lt;queue&gt;    using namespace std;    int main &#40;&#41;    &#123;        queue&lt;int&gt; myqueue;        int sum &#40;0&#41;;        for &#40;int i = 1; i &lt;= 10; i++&#41;             myqueue.push&#40;i&#41;;        while &#40;!myqueue.empty&#40;&#41;&#41;        &#123;            sum += myqueue.front&#40;&#41;;            myqueue.pop&#40;&#41;;        &#125;        cout &lt;&lt; sum &lt;&lt; endl;        return 0;    &#125;
A. 51
B. 52
C. 54
D. 55
Answer:A
#include &lt;iostream&gt;    #include &lt;queue&gt;    using namespace std;    int main &#40;&#41;    &#123;        queue&lt;int&gt; myqueue;        int sum &#40;0&#41;;        for &#40;int i = 1; i &lt;= 10; i++&#41;             myqueue.push&#40;i&#41;;        while &#40;!myqueue.empty&#40;&#41;&#41;        &#123;            sum += myqueue.front&#40;&#41;;            myqueue.pop&#40;&#41;;        &#125;        cout &lt;&lt; sum &lt;&lt; endl;        return 0;    &#125;
A. 51 B. 52 C. 54 D. 55
Explanation:In this program, We used the push and pop operation of quueue to find out the total of all the number from 1 to 10.