강의

멘토링

커뮤니티

Inflearn Community Q&A

andantej99's profile image
andantej99

asked

Learn C Programming by Following Along with Hong Jeong-mo

10.14 Two-dimensional arrays and pointers

8:39 / 9:25

Written on

·

307

0

강의에서 21번째 줄의 코드

printf("%u\n", (unsigned)(& arr2d[1]));

에서 주소라는 의미를 강조하기 위해 &를 붙였다. 사실은 있으나 없으나 똑같다. 라고 이해해도 될까요?

 

강의에서 33번째 줄에서  (unsigned)* (arr2d + j) 이렇게 되어있는데   (unsigned) (arr2d + j) 과 동일한 값을 출력합니다.

*은 역참조 했다. 역참조한 값도 결국 주소이다 라고 이해해도 될까요?

c

Answer 1

1

배열의 주소를 나타낼 때 &를 생략해도 되는 때는 [0]번 일 때만입니다.

&arr2d[1] 의 경우에는 반드시 &를 붙여야 합니다.

andantej99님의 프로필 이미지
andantej99
Questioner

감사합니다!

andantej99's profile image
andantej99

asked

Ask a question