原来指针还有这种骚操作

#include "stdio.h"
#include <typeinfo>

int main()
{
	int a[4] = {100, 5, 6, 0};
	int *p = a;
	printf("%d,%d,%d,%d", p[0], p[1], p[2], p[3]);
	return 0;
}

输出内容为:

100, 5, 6, 0

猜你喜欢

转载自blog.csdn.net/Stephen___Qin/article/details/102414107