#include&lt;stdio.h&gt;   #include&lt;stdlib.h&gt;&nbsp;   int main&#40;&#41;   &#123;       char *ptr;       ptr = &#40;char *&#41;malloc&#40;sizeof&#40;char&#41;*11&#41;;       ptr = &quot;sanfoundry&quot;;       printf&#40;&quot;%s\n&quot;,*ptr&#41;;       return 0;   &#125;
A. sanfoundry
B. segmentation fault
C. syntax error
D. none of the mentioned
Answer:A
#include&lt;stdio.h&gt;   #include&lt;stdlib.h&gt;&nbsp;   int main&#40;&#41;   &#123;       char *ptr;       ptr = &#40;char *&#41;malloc&#40;sizeof&#40;char&#41;*11&#41;;       ptr = &quot;sanfoundry&quot;;       printf&#40;&quot;%s\n&quot;,*ptr&#41;;       return 0;   &#125;
A. sanfoundry B. segmentation fault C. syntax error D. none of the mentioned
Explanation:value of a string can not be assign to a pointer.