#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int* test()
{
	int a = 10;
	return &a;
}
int main()
{
	int* p = test();
	*p = 20;
	printf("%d", *p);
	//非法,a是局部变量,出了test后被释放
	//指针类型决定了指针进行解引用时能访问的空间大小
	//int* p;*p能访问4个字节
	//char* p;*p能够访问1个字节
	//double*p;*p能访问8个字节
	//指针类型决定了:指针走一步走多远(指针的步长)
	return 0;
}