<span class="Apple-style-span" style="border-collapse:collapse;font-family:song,Verdana;font-size:12px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="t_f" id="postmessage_21891391">
1       #include<stdio.h><br>
2       #include<stdlib.h><br>
3       int main ()<br>
4       {<br>
5               char *c[3];<br>
6               char **p;<br>
7               int i=0;<br>
8               p=c;<br>
9               printf("please enter the strings: ");<br>
10              for(p;p<c+3;p++)<br>
(gdb) <br>
11                      scanf("%s",*p);<br>
12              p=c;<br>
13              for(p;p<c+3;p++)<br>
14                      printf("%s",*p);<br>
15              exit(0);<br>
16      }<br>
输入并输出3个不等长字符串,gdb调试出现段错误,backtrace后应该是代码的11行出了问题,不知是什么原因,求解答</td></tr></tbody></table></span>