강의

멘토링

로드맵

Inflearn Community Q&A

aaa1649491578's profile image
aaa1649491578

asked

Learn C Programming by Following Along with Hong Jeong-mo

4.2 sizeof operator

형식 지정자 zu

Written on

·

649

0

제가 형식 지정자 zu를 언제 쓰는 지에 대한 이해가 완벽한 이해가 되지 않습니다. 혹시 간단하게 설명해 주실 수 있을까요?

c

Answer 2

3

http://www.cplusplus.com/reference/cstdio/size_t/

위 문서에 따르면 sizeof 연산자는 리턴 타입이 size_t 입니다. 

이 size_t 타입의 형식지정자가 바로 %zu 여서 

sizeof 연산 결과나 혹은 size_t 타입의 변수를 출력할 때 zu 를 사용하시면 됩니다. 

0

aaa164949님의 프로필 이미지
aaa164949
Questioner

감사합니다!

aaa1649491578's profile image
aaa1649491578

asked

Ask a question