谭浩强的 指针访问二维数组例题有疑问
程序代码:
#include <stdio.h> int main(int argc, char *argv[]) { float score[][4]={{60,70,80,90},{92,85,75,65},{65,70,85,90},{85,95,75,60}}; float *search(float(*pointer)[4],int n); float *p; int i,m; printf("enter the number of student:"); scanf("%d",&m); printf("The Scores of No.%d are:\n",m); p=search(score,m); for(i=0;i<4;i++) { printf("%5.2f\t",*(p+i)); } } float *search(float(*pointer)[4],int n) { float *pt; pt= pointer+n; //我这样写的,书上是pt=*(pointer+n),都编译正确,请问这怎么解释? return(pt); }
[ 本帖最后由 zhansir 于 2010-5-19 11:25 编辑 ]