/*
*Copyright (c) 2014,烟台大学计算机学院
*All rights reserved .
*文件名称:test .cpp
*作 者:曹莉萍
*完成日期:2014 年12月3日
*版 本 号:v1.0
*
*/
#include <iostream>
using namespace std;
int *p;
void pp(int a,int*b);
int main()
{
int a=1,b=2,c=3;
p=&b;
pp(a+c,&b);
cout<<"(2)"<<a<<","<<b<<","<<*p<<endl;
return 0;
}
void pp(int a,int *b)
{
int c=4;
*p=*b+c;
a=*p-c;
cout<<"(1)"<<a<<","<<*b<<","<<*p<<endl;
}
运行结果
<img src="https://img-blog.csdn.net/20141203224712281" alt="" />