#include &lt;iostream&gt;    #include &lt;deque&gt;    using namespace std;    int main &#40;&#41;    &#123;        deque&lt;int&gt; mydeque;        int sum &#40;0&#41;;        mydeque.push_back &#40; 10 &#41;;        mydeque.push_back &#40; 20 &#41;;        mydeque.push_back &#40; 30 &#41;;        while &#40;!mydeque.empty&#40;&#41;&#41;        &#123;            sum += mydeque.back&#40;&#41;;            mydeque.pop_back&#40;&#41;;        &#125;        cout &lt;&lt; sum &lt;&lt; '\n';        return 0;    &#125;
A. 10
B. 20
C. 30
D. 60
Answer:A
#include &lt;iostream&gt;    #include &lt;deque&gt;    using namespace std;    int main &#40;&#41;    &#123;        deque&lt;int&gt; mydeque;        int sum &#40;0&#41;;        mydeque.push_back &#40; 10 &#41;;        mydeque.push_back &#40; 20 &#41;;        mydeque.push_back &#40; 30 &#41;;        while &#40;!mydeque.empty&#40;&#41;&#41;        &#123;            sum += mydeque.back&#40;&#41;;            mydeque.pop_back&#40;&#41;;        &#125;        cout &lt;&lt; sum &lt;&lt; '\n';        return 0;    &#125;
A. 10 B. 20 C. 30 D. 60
Explanation:In this program, We are adding all the values in the queue.