c-45 用指针 做 函数的 参数 和返回值
#include <stdio.h>
#include <math.h>
//求N次方的值
int* function1(int *p,int index)
{
*p = pow(*p, index);
return p;
}
int main(int argc, char* argv[])
{
//用指针 做函数的 参数 和返回值
int i = 1;
int *p = &i;
p=function1(p, 4);
printf("%d ", *p);
getchar();
return 0;
}