#include<stdio.h>
#include<string.h>
#include<stdlib.h>
getvalue(int c)//参数传递过来,并不等于a=c;而是c=a=30;只是对c进行赋值,这里并不能改变a的值
{
printf("c:%d \n", c);
c = 20;
return c;
}
getvalue2(int *p)
{
*p = 200;
}
main()
{
int a = 30;
int *p = NULL;
a=getvalue(a);//只是在这里实现的赋值,函数getvalue改变的是c的值,调用完函数就被释放了空间,c就不存在了
p = &a;
getvalue2(&a);
printf("a:%d \n",a);
printf("hello....\n");
system("pause");
return;
}