第15周项目1-打入内部,

来源:互联网 发布:ipad钢琴谱软件 编辑:程序博客网 时间:2024/05/11 03:06

指针代码单步调试:

#include<iostream>using namespace std;int main(){    int a=2, b=3, c[5]= {1,2,3,4,5};    int *p1, *p2, *p3;    p1=&a;    p2=&b;    p3=c;    p3++;    (*p3)+=10;    cout<<a<<'\t'<<b<<'\t'<<c[1]<<endl;    cout<<*p1<<'\t'<<*p2<<'\t'<<*p3<<endl;    return 0;}


运行过程:

0 0
原创粉丝点击