#include &lt;iostream&gt;    #include &lt;new&gt;    #include &lt;cstdlib&gt;    using namespace std;    const int bsize = 512;    int *pa;    bool allocate = true;    void get_memory&#40;&#41;     &#123;        cerr &lt;&lt; &quot;free store exhausted&quot; &lt;&lt; endl;        delete &#91;&#93; pa;        allocate = false;    &#125;    void eat_memory&#40;int size&#41;     &#123;        int *p = new int&#91;size&#93;;        if &#40;allocate&#41;            eat_memory&#40;size&#41;;        else            cerr &lt;&lt; &quot;free store addr = &quot; &lt;&lt; p &lt;&lt; endl;    &#125;    int main&#40;&#41;    &#123;        set_new_handler&#40;get_memory&#41;;        pa = new int&#91;bsize&#93;;        cerr &lt;&lt; &quot;free store addr = &quot; &lt;&lt; pa &lt;&lt; endl;        eat_memory&#40;bsize&#41;;        return 0;    &#125;
A. free store addr
B. Error
C. Segmentation fault
D. None of the mentioned
Answer:A
#include &lt;iostream&gt;    #include &lt;new&gt;    #include &lt;cstdlib&gt;    using namespace std;    const int bsize = 512;    int *pa;    bool allocate = true;    void get_memory&#40;&#41;     &#123;        cerr &lt;&lt; &quot;free store exhausted&quot; &lt;&lt; endl;        delete &#91;&#93; pa;        allocate = false;    &#125;    void eat_memory&#40;int size&#41;     &#123;        int *p = new int&#91;size&#93;;        if &#40;allocate&#41;            eat_memory&#40;size&#41;;        else            cerr &lt;&lt; &quot;free store addr = &quot; &lt;&lt; p &lt;&lt; endl;    &#125;    int main&#40;&#41;    &#123;        set_new_handler&#40;get_memory&#41;;        pa = new int&#91;bsize&#93;;        cerr &lt;&lt; &quot;free store addr = &quot; &lt;&lt; pa &lt;&lt; endl;        eat_memory&#40;bsize&#41;;        return 0;    &#125;
A. free store addr B. Error C. Segmentation fault D. None of the mentioned
Explanation:In this program, The memory will go beyond the limit, So there will be exhaustion in memory.