二级指针的菜鸟问题
程序代码:
#include"stdio.h" char *day_name(int n) { char *name[100]={"illegal day!!","monday","tuesday","wensday","thyursday","friday","satday","sunday"}; if(n>0&&n<8) return name[n]; else return name[0]; } void main() { int n; printf("请输入一个整数:"); scanf("%d",&n); printf(" 这天是%s\n",*day_name(n)); }编译时候没有问题,但是运行不了,这部分我不怎么明白,谢谢大侠们!