实现输入月份号输出该月份的英文名

实现输入月份号输出该月份的英文名

/***************************************
功能:实现输入月份号输出该月份的英文名
日期:2014年12月8日10:27:20
****************************************/
#include
int main()
{
	char *Month[] = {"January","February","March","April","May","June","Junly","August","September","October","November","December"};
	int i ;
	char **p;//定义指向指针的指针变量p
	p = Month;//将数组首地址值赋给指针变量p
	printf("Input a number for month\n");
	scanf("%d",&i);
	printf("The month is:");
	printf("%s\n",*(p + i - 1));
	return 0;
} 
/***************************
Input a number for month
9
The month is:September
Press any key to continue
****************************/


你可能感兴趣的:(C语言学习,指针的指针,字符串)