您的位置:首页 > 其它

第十五周上机项目2--(2) 阅读程序

2014-12-03 22:44 246 查看
/*
*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="http://img.blog.csdn.net/20141203224712281" alt="" />
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: