본문 바로가기
프로그래밍/C

포인터

by Luhie 2017. 6. 29.

간접 연산자 *


선언

int *prtint


데이터의 타입만큼 커지거나 작아지거나


#include <stdio.h>


int main(void) 

{

// 3차원 배열

int ary[][3][2] = { {{1, 2}, {3,4}, {5,6}},{{7,8 }, { 9,10 }, { 11,12 }} };//[2][3][2]

//행 우선순위 

// 배열을 가리키는

int(*ptr)[3][2];


ptr = ary;


printf("%d \n", *(ptr + 1));

printf("%d \n", *(*(*ptr + 1) + 1));


return 0;

}



08장 포인터.docx