-
-
Save nattybear/7a6d381ac095dc69ac2f1c9545284b67 to your computer and use it in GitHub Desktop.
C언어 서식문자 - %o와 %x
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() { | |
| int a = 8; | |
| int b = 16; | |
| // 10진수 8을 8진수로 출력한다. | |
| printf("%o\n", a); | |
| // 10진수 16을 16진수로 출력한다. | |
| printf("%x\n", b); | |
| return 0; | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
%o랑 %d는 연산자가 아니라 서식문자
서식문자야#은 무조건 들어가지 않아도 상관 없어#은 도대체 언제 넣는건데?ㅎ