指针7--1运算符&和*的示例

来源:互联网 发布:编程 hack是什么意思 编辑:程序博客网 时间:2024/06/05 16:38
运算符&和*的示例
#include<iostream.h>#include<stdio.h>int main(){    int n;int *nptr;n=7;nptr=&n;     printf("The address of n is %p"     "\nThe value of nptr is %p\n\n",&n,nptr);printf("The value of n is %d"  "\nThe value of *nptr is %d",n,*nptr);printf("\n\n&*nptr=%p\n*&nptr=%p\n",&*nptr,*&nptr);return 0;}

原创粉丝点击