Last active
July 16, 2019 09:53
-
-
Save surinoel/635c8612e00fae7d62456f3856b746c0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(void) { | |
int numArr[3][4] = { | |
{ 11, 22, 33, 44 }, | |
{ 55, 66, 77, 88 }, | |
{ 99, 110, 121, 132 } | |
}; | |
// int** numPtr = numArr; // 강제 캐스팅 (int**)하면 실행은 되지만, 결국 -값을 리턴하면서 끝난다 | |
int (*numPtr)[4] = numArr; // 만일 괄호를 빼먹은다면, 배열 포인터가즉 int *numPtr[4]는 포인터 배열을 의미한다 | |
printf("%d\n", numPtr[0][0]); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment