EXAMPLES_LIST.md

Download
markdown 177 lines 4.5 KB
  1# ์ž‘์„ฑ๋œ ์˜ˆ์ œ ์ฝ”๋“œ ๋ชฉ๋ก
  2
  3## C ํ”„๋กœ๊ทธ๋žจ (๋ฐ์Šคํฌํ†ฑ/์ฝ˜์†”)
  4
  5### โœ… 02. ๊ณ„์‚ฐ๊ธฐ
  6- **ํŒŒ์ผ**: `02_calculator/calculator.c`
  7- **์ปดํŒŒ์ผ**: `gcc calculator.c -o calculator`
  8- **์‹คํ–‰**: `./calculator`
  9- **๋‚ด์šฉ**: ๊ธฐ๋ณธ ์‚ฌ์น™์—ฐ์‚ฐ ๊ณ„์‚ฐ๊ธฐ, ํ•จ์ˆ˜์™€ switch-case ์‚ฌ์šฉ
 10
 11### โœ… 03. ์ˆซ์ž ๋งž์ถ”๊ธฐ ๊ฒŒ์ž„
 12- **ํŒŒ์ผ**: `03_number_guess/number_guess.c`
 13- **์ปดํŒŒ์ผ**: `gcc number_guess.c -o number_guess`
 14- **์‹คํ–‰**: `./number_guess`
 15- **๋‚ด์šฉ**: 1-100 ์‚ฌ์ด ์ˆซ์ž ๋งž์ถ”๊ธฐ, rand() ์‚ฌ์šฉ
 16
 17### โœ… 05. ๋™์  ๋ฐฐ์—ด
 18- **ํŒŒ์ผ**: `05_dynamic_array/dynamic_array.c`
 19- **์ปดํŒŒ์ผ**: `gcc dynamic_array.c -o dynamic_array`
 20- **์‹คํ–‰**: `./dynamic_array`
 21- **๋‚ด์šฉ**: malloc/realloc์„ ์ด์šฉํ•œ ๋™์  ๋ฐฐ์—ด ๊ตฌํ˜„
 22
 23**์‹คํ–‰ ๊ฒฐ๊ณผ ์˜ˆ์‹œ:**
 24```
 25=== ๋™์  ๋ฐฐ์—ด ํ…Œ์ŠคํŠธ ===
 26
 27์š”์†Œ ์ถ”๊ฐ€: 10, 20, 30, 40, 50
 28์šฉ๋Ÿ‰ ํ™•์žฅ: 2 -> 4
 29์šฉ๋Ÿ‰ ํ™•์žฅ: 4 -> 8
 30๋ฐฐ์—ด: [10, 20, 30, 40, 50]
 31ํฌ๊ธฐ: 5, ์šฉ๋Ÿ‰: 8
 32```
 33
 34### โœ… 06. ์—ฐ๊ฒฐ ๋ฆฌ์ŠคํŠธ
 35- **ํŒŒ์ผ**: `06_linked_list/linked_list.c`
 36- **์ปดํŒŒ์ผ**: `gcc linked_list.c -o linked_list`
 37- **์‹คํ–‰**: `./linked_list`
 38- **๋‚ด์šฉ**: ๋‹จ์ผ ์—ฐ๊ฒฐ ๋ฆฌ์ŠคํŠธ ๊ตฌํ˜„, ์ถ”๊ฐ€/์‚ญ์ œ/๊ฒ€์ƒ‰
 39
 40### โœ… 12. ๋ฉ€ํ‹ฐ์Šค๋ ˆ๋“œ
 41- **ํŒŒ์ผ**: `12_multithread/thread_basic.c`
 42- **์ปดํŒŒ์ผ**: `gcc thread_basic.c -o thread_basic -pthread`
 43- **์‹คํ–‰**: `./thread_basic`
 44- **๋‚ด์šฉ**: pthread๋ฅผ ์ด์šฉํ•œ ๊ธฐ๋ณธ ๋ฉ€ํ‹ฐ์Šค๋ ˆ๋”ฉ
 45
 46### โœ… 14. ๋น„ํŠธ ์—ฐ์‚ฐ
 47- **ํŒŒ์ผ**: `14_bit_operations/bit_manipulation.c`
 48- **์ปดํŒŒ์ผ**: `gcc bit_manipulation.c -o bit_manipulation`
 49- **์‹คํ–‰**: `./bit_manipulation`
 50- **๋‚ด์šฉ**: ๋น„ํŠธ ๋งˆ์Šคํ‚น, SET/CLEAR/TOGGLE/GET
 51
 52**์‹คํ–‰ ๊ฒฐ๊ณผ ์˜ˆ์‹œ:**
 53```
 54=== ๋น„ํŠธ ์กฐ์ž‘ ์˜ˆ์ œ ===
 55
 56์ดˆ๊ธฐ๊ฐ’: 1011 0010 (0xB2, 178)
 57
 58๋น„ํŠธ 3 ์„ค์ • (SET_BIT):
 59  ๊ฒฐ๊ณผ: 1011 1010 (0xBA)
 60
 61๋น„ํŠธ 5 ํ•ด์ œ (CLEAR_BIT):
 62  ๊ฒฐ๊ณผ: 1001 1010 (0x9A)
 63```
 64
 65---
 66
 67## Arduino ํ”„๋กœ๊ทธ๋žจ (.ino)
 68
 69### โœ… 13. LED ๊นœ๋นก์ด๊ธฐ (Blink)
 70- **ํŒŒ์ผ**: `13_embedded_basic/blink.ino`
 71- **ํ”Œ๋žซํผ**: Arduino Uno
 72- **์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ**: https://wokwi.com
 73- **๋‚ด์šฉ**: ๊ฐ€์žฅ ๊ธฐ๋ณธ์ ์ธ Arduino ํ”„๋กœ๊ทธ๋žจ, LED 1์ดˆ ๊ฐ„๊ฒฉ ๊นœ๋นก์ž„
 74
 75**Wokwi ์‹คํ–‰ ๋ฐฉ๋ฒ•:**
 761. https://wokwi.com ์ ‘์†
 772. New Project โ†’ Arduino Uno
 783. ์ฝ”๋“œ ๋ณต์‚ฌ/๋ถ™์—ฌ๋„ฃ๊ธฐ
 794. Start Simulation
 80
 81### โœ… 15. ๋ฒ„ํŠผ์œผ๋กœ LED ์ œ์–ด
 82- **ํŒŒ์ผ**: `15_gpio_control/button_led.ino`
 83- **ํ”Œ๋žซํผ**: Arduino Uno
 84- **๋‚ด์šฉ**: ๋ฒ„ํŠผ ๋ˆ„๋ฅผ ๋•Œ๋งˆ๋‹ค LED ํ† ๊ธ€, ๋””๋ฐ”์šด์‹ฑ ํฌํ•จ
 85
 86**ํšŒ๋กœ ๊ตฌ์„ฑ (Wokwi):**
 87- ๋ฒ„ํŠผ: ํ•€ 2 โ†” GND
 88- LED: ํ•€ 13 (๋‚ด์žฅ LED)
 89
 90### โœ… 16. ์‹œ๋ฆฌ์–ผ ๊ณ„์‚ฐ๊ธฐ
 91- **ํŒŒ์ผ**: `16_serial_comm/serial_calculator.ino`
 92- **ํ”Œ๋žซํผ**: Arduino Uno
 93- **๋‚ด์šฉ**: ์‹œ๋ฆฌ์–ผ ๋ชจ๋‹ˆํ„ฐ๋กœ ์ˆ˜์‹ ์ž…๋ ฅ๋ฐ›์•„ ๊ณ„์‚ฐ
 94
 95**์‚ฌ์šฉ ์˜ˆ์‹œ:**
 96```
 97Simple Serial Calculator
 98Enter expression (e.g., 10 + 5)
 99---------------------------------
10010 + 5
10110 + 5 = 15.00
102---------------------------------
10320 * 3
10420 * 3 = 60.00
105```
106
107---
108
109## ์ผ๊ด„ ์ปดํŒŒ์ผ
110
111### ๋ชจ๋“  C ํ”„๋กœ๊ทธ๋žจ ์ปดํŒŒ์ผ
112```bash
113cd examples
114make c-programs
115```
116
117### ๋ฉ€ํ‹ฐ์Šค๋ ˆ๋“œ ํ”„๋กœ๊ทธ๋žจ๋งŒ ์ปดํŒŒ์ผ
118```bash
119make thread-programs
120```
121
122### ๋ชจ๋‘ ์ปดํŒŒ์ผ
123```bash
124make
125```
126
127### ์ •๋ฆฌ
128```bash
129make clean
130```
131
132### ๊ฐœ๋ณ„ ์‹คํ–‰
133```bash
134make run-calculator   # ๊ณ„์‚ฐ๊ธฐ ์‹คํ–‰
135make run-guess        # ์ˆซ์ž ๋งž์ถ”๊ธฐ ์‹คํ–‰
136make run-array        # ๋™์  ๋ฐฐ์—ด ์‹คํ–‰
137make run-list         # ์—ฐ๊ฒฐ ๋ฆฌ์ŠคํŠธ ์‹คํ–‰
138make run-bit          # ๋น„ํŠธ ์—ฐ์‚ฐ ์‹คํ–‰
139make run-thread       # ์Šค๋ ˆ๋“œ ์‹คํ–‰
140```
141
142---
143
144## ์ถ”๊ฐ€ ์˜ˆ์ • ์˜ˆ์ œ
145
146๋‹ค์Œ ์˜ˆ์ œ๋“ค์€ ํ•™์Šต ๋ฌธ์„œ์— ์žˆ์ง€๋งŒ ์•„์ง ์ฝ”๋“œ ํŒŒ์ผ๋กœ ์ž‘์„ฑ๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค:
147
148### ์˜ˆ์ • ๋ชฉ๋ก
149- [ ] 04. ์ฃผ์†Œ๋ก (address_book.c)
150- [ ] 07. ํŒŒ์ผ ์•”ํ˜ธํ™” (file_crypto.c)
151- [ ] 08. ์Šคํƒ๊ณผ ํ (stack_queue.c)
152- [ ] 09. ํ•ด์‹œ ํ…Œ์ด๋ธ” (hash_table.c)
153- [ ] 10. ๋ฑ€ ๊ฒŒ์ž„ (snake_game.c)
154- [ ] 11. ๋ฏธ๋‹ˆ ์‰˜ (minishell.c)
155
156์ด ์˜ˆ์ œ๋“ค์€ ํ•™์Šต ๋ฌธ์„œ์˜ ์ „์ฒด ์ฝ”๋“œ๋ฅผ ์ฐธ๊ณ ํ•˜์—ฌ ์ž‘์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
157
158---
159
160## ํ…Œ์ŠคํŠธ ์™„๋ฃŒ ์ƒํƒœ
161
162| ์˜ˆ์ œ | ์ปดํŒŒ์ผ | ์‹คํ–‰ | ์ƒํƒœ |
163|------|--------|------|------|
164| calculator | โœ… | โœ… | ์ •์ƒ ๋™์ž‘ |
165| number_guess | โœ… | โธ๏ธ | ์ธํ„ฐ๋ž™ํ‹ฐ๋ธŒ |
166| dynamic_array | โœ… | โœ… | ์ •์ƒ ๋™์ž‘ |
167| linked_list | โœ… | โœ… | ์ •์ƒ ๋™์ž‘ |
168| thread_basic | โœ… | โธ๏ธ | pthread ํ•„์š” |
169| bit_manipulation | โœ… | โœ… | ์ •์ƒ ๋™์ž‘ |
170| blink.ino | - | ๐ŸŒ | Wokwi ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ |
171| button_led.ino | - | ๐ŸŒ | Wokwi ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ |
172| serial_calculator.ino | - | ๐ŸŒ | Wokwi ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ |
173
174โœ… = ํ…Œ์ŠคํŠธ ์™„๋ฃŒ
175โธ๏ธ = ์ธํ„ฐ๋ž™ํ‹ฐ๋ธŒ/ํŠน์ˆ˜ ํ™˜๊ฒฝ ํ•„์š”
176๐ŸŒ = ์›น ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ