输出为什么错误呢
程序代码:
#include "stdio.h" void main() { int i; char *a[4]={"this","is","a","book"}; for(i=0;i<4;i++) printf("%s ",a[i]); printf("\n"); }上述代码顺序输出结果,没问题,但改为下面的代码后(想逆序输出),运行后确显示“该内存不能为read”,奇怪了?????
程序代码:
#include "stdio.h" void main() { int i; char *a[4]={"this","is","a","book"}; for(i=3;i>=0;i++) printf("%s ",a[i]); printf("\n"); }