.
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진수로 출력한다. |
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() { | |
float a = 0.123456f; | |
// %f 서식문자는 고정 소수점 형식으로 출력한다. | |
// 즉 보통 사람들이 소수점을 쓰듯이 표현된다. | |
printf("%f\n", a); // 0.123456 | |
// %e 서식문자는 부동 소수점 형식으로 출력한다. |
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() { | |
// 우선 숫자 1을 출력한다. | |
// 숫자 1은 화면에서 1칸만 차지하지 | |
printf("%d\n", 1); // 1 | |
// 이번에는 1칸 띈 위치에 출력하라고 %1d라고 적었지만 | |
// 화면에는 위랑 똑같이 나오지 | |
// 그 이유는 % 뒤에 적어주는 숫자는 |
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
print("Hello World!") |
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
# 모스 부호를 키와 값의 쌍인 | |
# 딕셔너리로 저장한다. | |
dic = { '.-' : 'A', | |
'-...' : 'B', | |
'-.-.' : 'C', | |
'-..' : 'D', | |
'.' : 'E', | |
'..-.' : 'F', | |
'--.' : 'G', | |
'....' : 'H', |
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
HANDLE WINAPI CreateFile ( | |
_In_ LPCSTR lpFileName, | |
_In_ DWORD dwDesiredAccess, | |
_In_ DWORD dwShareMode, | |
_In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, | |
_In_ DWORD dwCreationDisposition, | |
_In_ DWORD dwFlagsAndAttributes, | |
_In_opt_ HANDLE hTemplateFile | |
); |
.
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
. |