#include&lt;stdio.h&gt;   #include&lt;stdlib.h&gt;   #include&lt;string.h&gt;                              &nbsp;   int main&#40;&#41;   &#123;       char *ptr;       memcpy&#40;ptr,&quot;sanfoundry&quot;,11&#41;;       printf&#40;&quot;%s\n&quot;,ptr&#41;;       return 0;   &#125;
A. sanfoudry
B. segmentation fault
C. syntax error
D. none of the mentioned
Answer:A
#include&lt;stdio.h&gt;   #include&lt;stdlib.h&gt;   #include&lt;string.h&gt;                              &nbsp;   int main&#40;&#41;   &#123;       char *ptr;       memcpy&#40;ptr,&quot;sanfoundry&quot;,11&#41;;       printf&#40;&quot;%s\n&quot;,ptr&#41;;       return 0;   &#125;
A. sanfoudry B. segmentation fault C. syntax error D. none of the mentioned
Explanation:Memory must be allocated to pointer “ptr”.