主题:字符串数组的一个小程序问题
请各位帮帮我看看这个程序的错误
#include <stdio.h>
#include<stdlib.h>
int main (void)
[
char* pday[7];
pday[0]="sunday";
pday[1]="monday";
pday[2]="tuesday";
pday[3]="wednesday";
pday[4]="thursday";
pday[5]="friday";
pday="saturday";
char** plast;
char** pwalker;
//statements
printf("the day of the week:");
plast=pday+6;
for(pwalker=pday;pwalker<=plast;pwalker++)
printf("%s\n",*pwalker);
return(0);
}
#include <stdio.h>
#include<stdlib.h>
int main (void)
[
char* pday[7];
pday[0]="sunday";
pday[1]="monday";
pday[2]="tuesday";
pday[3]="wednesday";
pday[4]="thursday";
pday[5]="friday";
pday="saturday";
char** plast;
char** pwalker;
//statements
printf("the day of the week:");
plast=pday+6;
for(pwalker=pday;pwalker<=plast;pwalker++)
printf("%s\n",*pwalker);
return(0);
}