原來指針還有這種騷操作

#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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章