关于指针和数组方面的问题!!!!!!
#include<stdio.h>
int main(void)
{
char str[40]="i love you for ever";
const char *mytal[8]={"Adding numbers swiftly",
"Multiplying accurately","Stashing data",
"Following instructions to the letter",
"Understanding the c language"};
printf("%s,%s\n",str,mytal[0]);
return 0;
}
这个程序本身没什么意义。
我主要想问:const char *mytal[8]={"Adding numbers swiftly",
"Multiplying accurately","Stashing data",
"Following instructions to the letter",
"Understanding the c language"};
这段代码中*mytal[8]是什么意思????????该怎么解释这个声明语句?????????????
[解决办法]
VC调试时按Alt+8、Alt+6和Alt+5,打开汇编窗口、内存窗口和寄存器窗口看每句C对应的汇编、单步执行并观察相应内存和寄存器变化,这样过一遍不就啥都明白了吗。
对VC来说,所谓‘调试时’就是编译连接通过以后,按F10或F11键单步执行一步以后的时候,或者在某行按F9设了断点后按F5执行停在该断点处的时候。