#include &lt;iostream&gt;    #include &lt;string&gt;    using namespace std;    int main &#40;&#41;    &#123;        string str &#40;&quot;Microsoft&quot;&#41;;        for &#40;size_t i = 0; i &lt; str.length&#40;&#41;;&#41;        &#123;            cout &lt;&lt; str.at&#40;i-1&#41;;        &#125;        return 0;    &#125;
A. M
B. Microsoft
C. Micro
D. runtime error
Answer:A
#include &lt;iostream&gt;    #include &lt;string&gt;    using namespace std;    int main &#40;&#41;    &#123;        string str &#40;&quot;Microsoft&quot;&#41;;        for &#40;size_t i = 0; i &lt; str.length&#40;&#41;;&#41;        &#123;            cout &lt;&lt; str.at&#40;i-1&#41;;        &#125;        return 0;    &#125;
A. M B. Microsoft C. Micro D. runtime error
Explanation:This program will terminate because the cout element is out of range.