C++入门经典-例5.1-输出变量的指针

1:代码如下:

// 5.1.cpp : 定义控制台应用程序的入口点。
//

#include "stdafx.h"
#include <iostream>
using namespace std;
void main()
{
    int a=100;
    int *p=&a;
    printf("%d\n",p);        //获取地址值
}
View Code

运行结果:

posted @ 2017-09-14 16:12  一串字符串  阅读(208)  评论(0编辑  收藏  举报