指针与整数

xiaoxiao2021-02-28  75

#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> void main2() { int num1 = 10; int num2 = 20; printf("%p,%p\n", &num1, &num2); int *p; //scanf("%x", &p); //scanf("%p", &p); int x; scanf("%x", &x); //p = x; p = (int *)x; printf("%d\n", *p); system("pause"); }
转载请注明原文地址: https://www.6miu.com/read-78043.html

最新回复(0)