C语言关于指针题目
C语言指针简单的编程题
int?main(){ double?a[20]; double?result?=?0.0; int?i?=?0; double?fact?=?3.2; double?val?=?1.5; double?*ptrDouble?=?&a[0]; //输出所有数组值 for?(i?=?0;?i<20;i++) { *(ptrDouble?+?i)?=?i*fact+val; printf("%f?",*(ptrDouble?+?i)); } ptrDouble?=?&a[10]; //输出后是个值 for?(i?=?0;?i<10;i++) { result?=?result?+?*(ptrDouble+i); } printf("%f",result);};