#include &lt;fstream&gt;    using namespace std;    int main &#40;&#41;    &#123;        long pos;        ofstream outfile;        outfile.open &#40;&quot;test.txt&quot;&#41;;        outfile.write &#40;&quot;This is an apple&quot;,16&#41;;        pos = outfile.tellp&#40;&#41;;        outfile.seekp &#40;pos - 7&#41;;        outfile.write &#40;&quot; sam&quot;, 4&#41;;        outfile.close&#40;&#41;;        return 0;    &#125;
A. This is an apple
B. apple
C. sample
D. This is a sample
Answer:A
#include &lt;fstream&gt;    using namespace std;    int main &#40;&#41;    &#123;        long pos;        ofstream outfile;        outfile.open &#40;&quot;test.txt&quot;&#41;;        outfile.write &#40;&quot;This is an apple&quot;,16&#41;;        pos = outfile.tellp&#40;&#41;;        outfile.seekp &#40;pos - 7&#41;;        outfile.write &#40;&quot; sam&quot;, 4&#41;;        outfile.close&#40;&#41;;        return 0;    &#125;
A. This is an apple B. apple C. sample D. This is a sample