/*
* Copyright (c) 2014,烟台大学计算机学院
* All right reserved.
*文件名:fifteen week 2.2.app
* 作者:柴银平
* 完成时间:2014年12月9日
* 版本号: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<<'\n';
return 0;
}
void pp(int a,int *b)
{
int c=4;
*p=*b+c;
a=*p-c;
cout<<"(1)"<<a<<','<<*b<<','<<*p<<endl;
}