docs(10_Wiki): 위키 구조 정리 — 언어 튜토리얼 카테고리 폴더 제거 + 신규 자산 동기화
Topic_CSS/Topic_HTML/Topic_JavaScript/Topic_Prompt/Topic_Comfyui 등 기존 카테고리 폴더를 정리하고, Topic_Graphic/Dev 등 신규 산출물과 Topics 내부 세션/메모리 기록을 동기화.
This commit is contained in:
Vendored
BIN
Binary file not shown.
@@ -0,0 +1,191 @@
|
|||||||
|
---
|
||||||
|
id: c-tutorial-index
|
||||||
|
title: "C Tutorial"
|
||||||
|
category: "Programming_Language"
|
||||||
|
status: "draft"
|
||||||
|
verification_status: "conceptual"
|
||||||
|
canonical_id: ""
|
||||||
|
aliases: ["C Tutorial", "C MOC", "Topic_C index", "C 언어 목차"]
|
||||||
|
duplicate_of: ""
|
||||||
|
source_trust_level: "B"
|
||||||
|
confidence_score: 0.90
|
||||||
|
created_at: 2026-07-04
|
||||||
|
updated_at: 2026-07-04
|
||||||
|
review_reason: ""
|
||||||
|
merge_history: []
|
||||||
|
tags: ["c", "programming-language", "w3schools", "moc", "index"]
|
||||||
|
raw_sources: ["https://www.w3schools.com/c/index.php"]
|
||||||
|
applied_in: []
|
||||||
|
github_commit: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# [[C Tutorial]]
|
||||||
|
|
||||||
|
## 🎯 한 줄 통찰 (One-line insight)
|
||||||
|
Map of Content (MOC) for the W3Schools C Tutorial — the root that links every core C knowledge page in this topic folder. [S1]
|
||||||
|
|
||||||
|
## 🧠 핵심 개념 (Core concepts)
|
||||||
|
- This folder (`Topic_C`) wikifies the C programming language tutorial, one knowledge page per document, in P-Reinforce v3.1 format — same convention as `Topic_SQL` / `Topic_Python` / `Topic_Java` / `Topic_PHP` / `Topic_W3CSS` / `Topic_HTML` / `Topic_CSS` / `Topic_JavaScript`. [S1]
|
||||||
|
- **Scope**: tutorial + "Learning by examples" pages only. **Excluded**: `c_challenges_*` (18 code-challenge pages), `c_compiler`/`c_examples`/`c_exercises`/`c_practice`/`c_projects`/`c_quiz`/`c_exam`/`c_interview_questions`/`c_study_plan`/`c_syllabus`/`c_real_life_examples` (meta/index pages), `c_ref_*` (7 reference-dump pages: ctype, keywords, math, reference, stdio, stdlib, string, time). [S1]
|
||||||
|
- **97 of 97 planned docs complete — C category done.**
|
||||||
|
- Every page roots its Knowledge Graph back to this `[[C Tutorial]]` node.
|
||||||
|
|
||||||
|
## 📖 세부 내용 (Details)
|
||||||
|
|
||||||
|
### Basics
|
||||||
|
- [[C Intro]] ✅
|
||||||
|
- [[C Get Started]] ✅
|
||||||
|
- [[C Syntax]] ✅
|
||||||
|
- [[C Statements]] ✅
|
||||||
|
- [[C Output]] ✅
|
||||||
|
- [[C Comments]] ✅
|
||||||
|
- [[C Organize Code]] ✅
|
||||||
|
|
||||||
|
### Variables
|
||||||
|
- [[C Variables]] ✅
|
||||||
|
- [[C Variables Names]] ✅
|
||||||
|
- [[C Variables Change]] ✅
|
||||||
|
- [[C Variables Multiple]] ✅
|
||||||
|
- [[C Variables Format]] ✅
|
||||||
|
- [[C Variables RealLife]] ✅
|
||||||
|
|
||||||
|
### Data Types
|
||||||
|
- [[C Data Types]] ✅
|
||||||
|
- [[C Data Types Numbers]] ✅
|
||||||
|
- [[C Data Types Characters]] ✅
|
||||||
|
- [[C Data Types Dec]] ✅
|
||||||
|
- [[C Data Types Extended]] ✅
|
||||||
|
- [[C Data Types Sizeof]] ✅
|
||||||
|
- [[C Data Types RealLife]] ✅
|
||||||
|
|
||||||
|
### Constants & Storage
|
||||||
|
- [[C Constants]] ✅
|
||||||
|
- [[C Storage Classes]] ✅
|
||||||
|
- [[C Fixed Width Ints]] ✅
|
||||||
|
|
||||||
|
### Operators
|
||||||
|
- [[C Operators]] ✅
|
||||||
|
- [[C Operators Arithmetic]] ✅
|
||||||
|
- [[C Operators Assignment]] ✅
|
||||||
|
- [[C Operators Comparison]] ✅
|
||||||
|
- [[C Operators Logical]] ✅
|
||||||
|
- [[C Bitwise Operators]] ✅
|
||||||
|
- [[C Operators Precedence]] ✅
|
||||||
|
|
||||||
|
### Strings
|
||||||
|
- [[C Strings]] ✅
|
||||||
|
- [[C Strings Esc]] ✅
|
||||||
|
- [[C Strings Functions]] ✅
|
||||||
|
|
||||||
|
### Math & Random
|
||||||
|
- [[C Math]] ✅
|
||||||
|
- [[C Random Numbers]] ✅
|
||||||
|
|
||||||
|
### Booleans
|
||||||
|
- [[C Booleans]] ✅
|
||||||
|
- [[C Booleans RealLife]] ✅
|
||||||
|
|
||||||
|
### Conditions
|
||||||
|
- [[C Conditions]] ✅
|
||||||
|
- [[C Conditions Else]] ✅
|
||||||
|
- [[C Conditions ElseIf]] ✅
|
||||||
|
- [[C Conditions Short Hand]] ✅
|
||||||
|
- [[C Conditions Logical]] ✅
|
||||||
|
- [[C Conditions Nested]] ✅
|
||||||
|
- [[C Conditions RealLife]] ✅
|
||||||
|
|
||||||
|
### Switch
|
||||||
|
- [[C Switch]] ✅
|
||||||
|
|
||||||
|
### Loops
|
||||||
|
- [[C While Loop]] ✅
|
||||||
|
- [[C While Loop RealLife]] ✅
|
||||||
|
- [[C Do While Loop]] ✅
|
||||||
|
- [[C For Loop]] ✅
|
||||||
|
- [[C For Loop Nested]] ✅
|
||||||
|
- [[C For Loop RealLife]] ✅
|
||||||
|
- [[C Break Continue]] ✅
|
||||||
|
|
||||||
|
### Arrays
|
||||||
|
- [[C Arrays]] ✅
|
||||||
|
- [[C Arrays Size]] ✅
|
||||||
|
- [[C Arrays Loop]] ✅
|
||||||
|
- [[C Arrays Multi]] ✅
|
||||||
|
- [[C Arrays RealLife]] ✅
|
||||||
|
|
||||||
|
### Structs, Enums & Unions
|
||||||
|
- [[C Structs]] ✅
|
||||||
|
- [[C Structs Nested]] ✅
|
||||||
|
- [[C Structs Padding]] ✅
|
||||||
|
- [[C Structs Pointers]] ✅
|
||||||
|
- [[C Enums]] ✅
|
||||||
|
- [[C Unions]] ✅
|
||||||
|
- [[C Typedef]] ✅
|
||||||
|
|
||||||
|
### Pointers & Memory
|
||||||
|
- [[C Memory Address]] ✅
|
||||||
|
- [[C Memory Access]] ✅
|
||||||
|
- [[C Pointers]] ✅
|
||||||
|
- [[C Pointers Arithmetic]] ✅
|
||||||
|
- [[C Pointers Arrays]] ✅
|
||||||
|
- [[C Pointer To Pointer]] ✅
|
||||||
|
- [[C Memory Management]] ✅
|
||||||
|
- [[C Memory Allocate]] ✅
|
||||||
|
- [[C Memory Deallocate]] ✅
|
||||||
|
- [[C Memory Reallocate]] ✅
|
||||||
|
- [[C Memory Struct]] ✅
|
||||||
|
- [[C Memory RealLife]] ✅
|
||||||
|
|
||||||
|
### Functions
|
||||||
|
- [[C Functions]] ✅
|
||||||
|
- [[C Functions Decl]] ✅
|
||||||
|
- [[C Functions Parameters]] ✅
|
||||||
|
- [[C Functions Recursion]] ✅
|
||||||
|
- [[C Functions Pointers]] ✅
|
||||||
|
- [[C Functions Callback]] ✅
|
||||||
|
- [[C Functions Inline]] ✅
|
||||||
|
|
||||||
|
### Scope
|
||||||
|
- [[C Scope]] ✅
|
||||||
|
|
||||||
|
### User Input & Date
|
||||||
|
- [[C User Input]] ✅
|
||||||
|
- [[C Date Time]] ✅
|
||||||
|
|
||||||
|
### Errors & Debugging
|
||||||
|
- [[C Errors]] ✅
|
||||||
|
- [[C Error Handling]] ✅
|
||||||
|
- [[C Input Validation]] ✅
|
||||||
|
- [[C Debugging]] ✅
|
||||||
|
|
||||||
|
### Files
|
||||||
|
- [[C Files]] ✅
|
||||||
|
- [[C Files Read]] ✅
|
||||||
|
- [[C Files Write]] ✅
|
||||||
|
|
||||||
|
### Type Conversion & Macros
|
||||||
|
- [[C Type Conversion]] ✅
|
||||||
|
- [[C Macros]] ✅
|
||||||
|
- [[C Null]] ✅
|
||||||
|
- [[C Newline]] ✅
|
||||||
|
|
||||||
|
## 🛠️ 적용 사례 (Applied in summary)
|
||||||
|
97 knowledge documents generated in this batch run, spanning Basics through Type Conversion & Macros.
|
||||||
|
|
||||||
|
## ✅ 검증 상태 및 신뢰도
|
||||||
|
- **상태:** draft
|
||||||
|
- **검증 단계:** conceptual
|
||||||
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference)
|
||||||
|
- **신뢰 점수:** 0.90
|
||||||
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||||
|
|
||||||
|
## 🔗 지식 그래프 (Knowledge Graph)
|
||||||
|
- **상위/루트:** [[10_Wiki]]
|
||||||
|
- **관련 개념:** [[C Intro]], [[PHP Tutorial]], [[Java Tutorial]], [[W3.CSS Tutorial]]
|
||||||
|
- **참조 맥락:** SQL/Python/Java/PHP/W3.CSS에 이어 W3Schools 지식화 시리즈의 다음 카테고리 — 시스템 프로그래밍 언어 계열의 첫 항목.
|
||||||
|
|
||||||
|
## 📚 출처 (Sources)
|
||||||
|
- [S1] W3Schools — C Tutorial — https://www.w3schools.com/c/index.php
|
||||||
|
|
||||||
|
## 📝 변경 이력 (Change history)
|
||||||
|
- 2026-07-04: Created C Tutorial MOC with scope decisions and full planned page list (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
---
|
||||||
|
id: c-arrays
|
||||||
|
title: "C Arrays"
|
||||||
|
category: "Programming_Language"
|
||||||
|
status: "draft"
|
||||||
|
verification_status: "conceptual"
|
||||||
|
canonical_id: ""
|
||||||
|
aliases: ["array declaration", "fixed-size array", "C 배열"]
|
||||||
|
duplicate_of: ""
|
||||||
|
source_trust_level: "B"
|
||||||
|
confidence_score: 0.86
|
||||||
|
created_at: 2026-07-04
|
||||||
|
updated_at: 2026-07-04
|
||||||
|
review_reason: ""
|
||||||
|
merge_history: []
|
||||||
|
tags: ["c", "programming-language", "w3schools", "arrays"]
|
||||||
|
raw_sources: ["https://www.w3schools.com/c/c_arrays.php"]
|
||||||
|
applied_in: []
|
||||||
|
github_commit: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# [[C Arrays]]
|
||||||
|
|
||||||
|
## 🎯 한 줄 통찰 (One-line insight)
|
||||||
|
Mixing types in an array literal (`int myArray[] = {25, 50, 75, 3.15, 5.99};`) doesn't always fail loudly — the source shows the float values `3.15`/`5.99` get silently TRUNCATED to `3`/`5` (since the array is typed `int`), and only "in some cases" does it produce an error, meaning the type-mismatch guard here is a silent-data-loss trap more often than a hard compile failure. [S1]
|
||||||
|
|
||||||
|
## 🧠 핵심 개념 (Core concepts)
|
||||||
|
- **Array literal creation** — `type name[] = {val1, val2, ...};` creates and initializes an array in one step. [S1]
|
||||||
|
- **Zero-based indexing** — `[0]` is the first element, `[1]` the second, and so on. [S1]
|
||||||
|
- **Mutable elements** — any element can be reassigned by index after creation (`myNumbers[0] = 33;`). [S1]
|
||||||
|
- **Size-first declaration** — `int myNumbers[4];` reserves space for 4 elements to be filled in later; the SIZE CANNOT CHANGE after creation. [S1]
|
||||||
|
- **Same-type requirement** — all elements must share one data type; mismatched types get silently truncated/converted, not cleanly rejected. [S1]
|
||||||
|
|
||||||
|
## 📖 세부 내용 (Details)
|
||||||
|
- Literal array creation and access: `int myNumbers[] = {25, 50, 75, 100}; printf("%d", myNumbers[0]); // 25`. [S1]
|
||||||
|
- Modifying an element by index: `myNumbers[0] = 33; // Now outputs 33 instead of 25`. [S1]
|
||||||
|
- Size-first, fill-later declaration: `int myNumbers[4]; myNumbers[0] = 25; myNumbers[1] = 50; myNumbers[2] = 75; myNumbers[3] = 100;`. [S1]
|
||||||
|
- Type-mismatch truncation trap: `int myArray[] = {25, 50, 75, 3.15, 5.99};` — 3.15 and 5.99 silently become 3 and 5. [S1]
|
||||||
|
|
||||||
|
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||||
|
- **타입이 섞이면 조용히 잘림**: int 배열에 float 값을 넣으면 항상 에러가 나는 게 아니라 대부분 소수점이 잘려나가는 형태로 조용히 처리되며, 일부 경우에만 에러가 발생한다는 점이 명시적으로 경고됨. [S1]
|
||||||
|
|
||||||
|
## 🛠️ 적용 사례 (Applied in summary)
|
||||||
|
현재 발견된 실제 적용 사례가 없습니다 — 크기를 먼저 선언하고 나중에 요소를 채우는 방식이 데이터가 순차적으로 들어올 때(예: 사용자 입력 반복) 실전에서 활용된다. [S1]
|
||||||
|
|
||||||
|
## 💻 코드 패턴 (Code patterns)
|
||||||
|
Declaring an array's size first, then filling in elements later (C):
|
||||||
|
```c
|
||||||
|
int myNumbers[4];
|
||||||
|
myNumbers[0] = 25;
|
||||||
|
myNumbers[1] = 50;
|
||||||
|
myNumbers[2] = 75;
|
||||||
|
myNumbers[3] = 100;
|
||||||
|
```
|
||||||
|
|
||||||
|
## ✅ 검증 상태 및 신뢰도
|
||||||
|
- **상태:** draft
|
||||||
|
- **검증 단계:** conceptual
|
||||||
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||||
|
- **신뢰 점수:** 0.86
|
||||||
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||||
|
|
||||||
|
## 🔗 지식 그래프 (Knowledge Graph)
|
||||||
|
- **상위/루트:** [[C Tutorial]]
|
||||||
|
- **관련 개념:** [[C Break Continue]], [[C Arrays Size]]
|
||||||
|
- **참조 맥락:** 배열 섹션 첫 챕터 — 배열 크기(Arrays Size) 챕터로 이어짐.
|
||||||
|
|
||||||
|
## 📚 출처 (Sources)
|
||||||
|
- [S1] W3Schools — C Arrays — https://www.w3schools.com/c/c_arrays.php
|
||||||
|
|
||||||
|
## 📝 변경 이력 (Change history)
|
||||||
|
- 2026-07-04: Initial draft synthesized from the W3Schools "C Arrays" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
---
|
||||||
|
id: c-arrays-loop
|
||||||
|
title: "C Array Loop"
|
||||||
|
category: "Programming_Language"
|
||||||
|
status: "draft"
|
||||||
|
verification_status: "conceptual"
|
||||||
|
canonical_id: ""
|
||||||
|
aliases: ["loop through array", "adaptive loop length", "C 배열 반복문"]
|
||||||
|
duplicate_of: ""
|
||||||
|
source_trust_level: "B"
|
||||||
|
confidence_score: 0.86
|
||||||
|
created_at: 2026-07-04
|
||||||
|
updated_at: 2026-07-04
|
||||||
|
review_reason: ""
|
||||||
|
merge_history: []
|
||||||
|
tags: ["c", "programming-language", "w3schools", "arrays", "loops"]
|
||||||
|
raw_sources: ["https://www.w3schools.com/c/c_arrays_loop.php"]
|
||||||
|
applied_in: []
|
||||||
|
github_commit: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# [[C Array Loop]]
|
||||||
|
|
||||||
|
## 🎯 한 줄 통찰 (One-line insight)
|
||||||
|
A hardcoded loop bound (`i < 4`) silently breaks the moment the array's contents change size — the source explicitly flags this as "not ideal, since it will only work for arrays of a specified size" — while replacing it with `sizeof(arr)/sizeof(arr[0])` makes the SAME loop automatically correct for an array of ANY length, turning a brittle magic number into a self-maintaining computation. [S1]
|
||||||
|
|
||||||
|
## 🧠 핵심 개념 (Core concepts)
|
||||||
|
- **Hardcoded loop bound (fragile)** — `for (i = 0; i < 4; i++)` only works correctly for exactly a 4-element array; adding/removing elements breaks it silently. [S1]
|
||||||
|
- **`sizeof` formula-driven bound (robust)** — `int length = sizeof(arr) / sizeof(arr[0]); for (i = 0; i < length; i++)` automatically adapts to the array's actual current size. [S1]
|
||||||
|
- **Standing rule** — the chapter's own summary: "Always use the sizeof formula when looping through arrays." [S1]
|
||||||
|
|
||||||
|
## 📖 세부 내용 (Details)
|
||||||
|
- Fragile hardcoded-bound loop: `int myNumbers[] = {25, 50, 75, 100}; int i; for (i = 0; i < 4; i++) { printf("%d\n", myNumbers[i]); }`. [S1]
|
||||||
|
- Robust size-adaptive loop: `int myNumbers[] = {25, 50, 75, 100}; int length = sizeof(myNumbers) / sizeof(myNumbers[0]); int i; for (i = 0; i < length; i++) { printf("%d\n", myNumbers[i]); }`. [S1]
|
||||||
|
|
||||||
|
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||||
|
- **하드코딩된 루프 경계의 취약성**: 배열 원소 개수가 바뀌면 i < 4 같은 고정된 조건이 더 이상 맞지 않게 된다는 점이 "이상적이지 않다"고 명시적으로 지적되며, sizeof 공식을 항상 쓰라는 규칙으로 이어짐. [S1]
|
||||||
|
|
||||||
|
## 🛠️ 적용 사례 (Applied in summary)
|
||||||
|
현재 발견된 실제 적용 사례가 없습니다 — sizeof 기반 반복문이 이후 Arrays RealLife 챕터의 평균 계산·최솟값 찾기 예제에서 그대로 재사용된다. [S1]
|
||||||
|
|
||||||
|
## 💻 코드 패턴 (Code patterns)
|
||||||
|
A loop that automatically adapts to any array size using the sizeof formula (C):
|
||||||
|
```c
|
||||||
|
int myNumbers[] = {25, 50, 75, 100};
|
||||||
|
int length = sizeof(myNumbers) / sizeof(myNumbers[0]);
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < length; i++) {
|
||||||
|
printf("%d\n", myNumbers[i]);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## ✅ 검증 상태 및 신뢰도
|
||||||
|
- **상태:** draft
|
||||||
|
- **검증 단계:** conceptual
|
||||||
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||||
|
- **신뢰 점수:** 0.86
|
||||||
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||||
|
|
||||||
|
## 🔗 지식 그래프 (Knowledge Graph)
|
||||||
|
- **상위/루트:** [[C Tutorial]]
|
||||||
|
- **관련 개념:** [[C Arrays Size]], [[C Arrays Multi]], [[C Arrays RealLife]]
|
||||||
|
- **참조 맥락:** 배열 반복문 — 다차원 배열(Arrays Multi) 챕터로 이어짐.
|
||||||
|
|
||||||
|
## 📚 출처 (Sources)
|
||||||
|
- [S1] W3Schools — C Array Loop — https://www.w3schools.com/c/c_arrays_loop.php
|
||||||
|
|
||||||
|
## 📝 변경 이력 (Change history)
|
||||||
|
- 2026-07-04: Initial draft synthesized from the W3Schools "C Array Loop" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
---
|
||||||
|
id: c-arrays-multi
|
||||||
|
title: "C Multidimensional Arrays"
|
||||||
|
category: "Programming_Language"
|
||||||
|
status: "draft"
|
||||||
|
verification_status: "conceptual"
|
||||||
|
canonical_id: ""
|
||||||
|
aliases: ["2D array", "matrix", "3D array", "C 다차원 배열"]
|
||||||
|
duplicate_of: ""
|
||||||
|
source_trust_level: "B"
|
||||||
|
confidence_score: 0.85
|
||||||
|
created_at: 2026-07-04
|
||||||
|
updated_at: 2026-07-04
|
||||||
|
review_reason: ""
|
||||||
|
merge_history: []
|
||||||
|
tags: ["c", "programming-language", "w3schools", "arrays", "multidimensional"]
|
||||||
|
raw_sources: ["https://www.w3schools.com/c/c_arrays_multi.php"]
|
||||||
|
applied_in: []
|
||||||
|
github_commit: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# [[C Multidimensional Arrays]]
|
||||||
|
|
||||||
|
## 🎯 한 줄 통찰 (One-line insight)
|
||||||
|
A multidimensional array is defined as literally "an array of arrays," and this compounds directly into the looping requirement: an N-dimensional array needs exactly N nested loops to visit every element — a 2D array needs 2 nested loops (as shown), a 3D array would need 3 — meaning the loop-nesting depth isn't a stylistic choice but a direct structural consequence of how many dimensions the array has. [S1]
|
||||||
|
|
||||||
|
## 🧠 핵심 개념 (Core concepts)
|
||||||
|
- **Multidimensional array** — "basically an array of arrays"; C supports any number of dimensions, with 2D being the most common. [S1]
|
||||||
|
- **2D array (`type name[rows][cols]`)** — a matrix/table; first bracket = row count, second bracket = column count. [S1]
|
||||||
|
- **Dual-index access** — `matrix[row][col]` addresses a specific cell; both indices are zero-based. [S1]
|
||||||
|
- **One nested loop per dimension** — looping a 2D array fully requires 2 nested loops (outer for rows, inner for columns); a 3D array would require 3 nested loops. [S1]
|
||||||
|
- **3D arrays (`type name[blocks][rows][cols]`)** — represent structures like multiple tables or game levels, each block itself being a 2D array. [S1]
|
||||||
|
|
||||||
|
## 📖 세부 내용 (Details)
|
||||||
|
- Creating and accessing a 2D array: `int matrix[2][3] = { {1, 4, 2}, {3, 6, 8} }; printf("%d", matrix[0][2]); // Outputs 2`. [S1]
|
||||||
|
- Modifying a specific cell: `matrix[0][0] = 9; // Now outputs 9 instead of 1`. [S1]
|
||||||
|
- Fully looping a 2D array with nested loops: `for (i = 0; i < 2; i++) { for (j = 0; j < 3; j++) { printf("%d\n", matrix[i][j]); } }`. [S1]
|
||||||
|
- Declaring a 3D array (2 blocks × 4 rows × 3 columns): `int example[2][4][3];`. [S1]
|
||||||
|
|
||||||
|
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||||
|
- **차원 수와 중첩 루프 개수의 직접 대응**: 2차원 배열은 중첩 루프 2개, 3차원 배열은 중첩 루프 3개가 필요하다는 구조적 대응 관계가 명시적으로 확인됨. [S1]
|
||||||
|
|
||||||
|
## 🛠️ 적용 사례 (Applied in summary)
|
||||||
|
2D 배열은 점수표, 게임판, 스프레드시트에, 3D 배열은 여러 테이블의 집합이나 게임의 여러 레벨 같은 복잡한 구조 표현에 적합하다고 원문에서 직접 제시됨. [S1]
|
||||||
|
|
||||||
|
## 💻 코드 패턴 (Code patterns)
|
||||||
|
Fully iterating a 2D array requires one nested loop per dimension (C):
|
||||||
|
```c
|
||||||
|
int matrix[2][3] = { {1, 4, 2}, {3, 6, 8} };
|
||||||
|
int i, j;
|
||||||
|
for (i = 0; i < 2; i++) {
|
||||||
|
for (j = 0; j < 3; j++) {
|
||||||
|
printf("%d\n", matrix[i][j]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## ✅ 검증 상태 및 신뢰도
|
||||||
|
- **상태:** draft
|
||||||
|
- **검증 단계:** conceptual
|
||||||
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||||
|
- **신뢰 점수:** 0.85
|
||||||
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||||
|
|
||||||
|
## 🔗 지식 그래프 (Knowledge Graph)
|
||||||
|
- **상위/루트:** [[C Tutorial]]
|
||||||
|
- **관련 개념:** [[C Arrays Loop]], [[C For Loop Nested]], [[C Arrays RealLife]]
|
||||||
|
- **참조 맥락:** 다차원 배열 — 배열 실전 예제(Arrays RealLife) 챕터로 이어짐.
|
||||||
|
|
||||||
|
## 📚 출처 (Sources)
|
||||||
|
- [S1] W3Schools — C Multidimensional Arrays — https://www.w3schools.com/c/c_arrays_multi.php
|
||||||
|
|
||||||
|
## 📝 변경 이력 (Change history)
|
||||||
|
- 2026-07-04: Initial draft synthesized from the W3Schools "C Multidimensional Arrays" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
---
|
||||||
|
id: c-arrays-reallife
|
||||||
|
title: "C Arrays - Real-Life Examples"
|
||||||
|
category: "Programming_Language"
|
||||||
|
status: "draft"
|
||||||
|
verification_status: "conceptual"
|
||||||
|
canonical_id: ""
|
||||||
|
aliases: ["average calculation", "find minimum", "C 배열 실전 예제"]
|
||||||
|
duplicate_of: ""
|
||||||
|
source_trust_level: "B"
|
||||||
|
confidence_score: 0.84
|
||||||
|
created_at: 2026-07-04
|
||||||
|
updated_at: 2026-07-04
|
||||||
|
review_reason: ""
|
||||||
|
merge_history: []
|
||||||
|
tags: ["c", "programming-language", "w3schools", "arrays", "real-life-example"]
|
||||||
|
raw_sources: ["https://www.w3schools.com/c/c_arrays_reallife.php"]
|
||||||
|
applied_in: []
|
||||||
|
github_commit: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# [[C Arrays - Real-Life Examples]]
|
||||||
|
|
||||||
|
## 🎯 한 줄 통찰 (One-line insight)
|
||||||
|
The "find lowest age" algorithm seeds its tracking variable with the array's OWN first element (`int lowestAge = ages[0];`) rather than an arbitrary sentinel like 0 or -1 — a deliberate choice that avoids a subtle bug: seeding with 0 would falsely "win" against any array of all-positive ages that happens to not contain a lower value, since every real comparison would need explicit special-casing otherwise. [S1]
|
||||||
|
|
||||||
|
## 🧠 핵심 개념 (Core concepts)
|
||||||
|
- **Average via accumulate-then-divide** — sum every element in a loop, then divide by the `sizeof`-derived length; requires a `float`/`double` result variable to avoid integer-division truncation. [S1]
|
||||||
|
- **Find-minimum via self-seeded comparison** — initialize the tracking variable with the array's first element, then compare/update while looping through the REST. [S1]
|
||||||
|
- **Skip-and-stop pattern reused** — the same `continue`-for-negatives, `break`-at-zero pattern from the Break/Continue chapter is reused here verbatim on an array. [S1]
|
||||||
|
|
||||||
|
## 📖 세부 내용 (Details)
|
||||||
|
- Average calculation: `int ages[] = {20, 22, 18, 35, 48, 26, 87, 70}; float avg, sum = 0; int length = sizeof(ages) / sizeof(ages[0]); for (i = 0; i < length; i++) { sum += ages[i]; } avg = sum / length; printf("The average age is: %.2f", avg);`. [S1]
|
||||||
|
- Find-minimum via self-seeding: `int lowestAge = ages[0]; for (i = 0; i < length; i++) { if (lowestAge > ages[i]) { lowestAge = ages[i]; } }`. [S1]
|
||||||
|
- Skip negatives, stop at zero: `int myNumbers[] = {3, -1, 7, 0, 9}; for (i = 0; i < length; i++) { if (myNumbers[i] < 0) { continue; } if (myNumbers[i] == 0) { break; } printf("%d\n", myNumbers[i]); }`. [S1]
|
||||||
|
|
||||||
|
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||||
|
- **최솟값 탐색 시 0이 아닌 첫 원소로 초기화하는 이유**: lowestAge를 0으로 초기화하면 모든 나이가 양수인 배열에서 항상 0이 "이겨버리는" 오류가 생기므로, 배열의 첫 원소로 초기화하는 것이 안전하다는 점이 예제 설계에서 암묵적으로 확인됨. [S1]
|
||||||
|
|
||||||
|
## 🛠️ 적용 사례 (Applied in summary)
|
||||||
|
나이 목록의 평균과 최솟값을 계산하는 두 예제가 원문에서 직접 실전 활용 사례로 제시되며, sizeof 기반 length 계산과 배열 순회 패턴을 실제 통계 계산에 적용하는 방법을 보여준다. [S1]
|
||||||
|
|
||||||
|
## 💻 코드 패턴 (Code patterns)
|
||||||
|
Finding the minimum value by seeding the tracker with the array's own first element (C):
|
||||||
|
```c
|
||||||
|
int ages[] = {20, 22, 18, 35, 48, 26, 87, 70};
|
||||||
|
int length = sizeof(ages) / sizeof(ages[0]);
|
||||||
|
int lowestAge = ages[0];
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < length; i++) {
|
||||||
|
if (lowestAge > ages[i]) {
|
||||||
|
lowestAge = ages[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## ✅ 검증 상태 및 신뢰도
|
||||||
|
- **상태:** draft
|
||||||
|
- **검증 단계:** conceptual
|
||||||
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||||
|
- **신뢰 점수:** 0.84
|
||||||
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||||
|
|
||||||
|
## 🔗 지식 그래프 (Knowledge Graph)
|
||||||
|
- **상위/루트:** [[C Tutorial]]
|
||||||
|
- **관련 개념:** [[C Arrays Multi]], [[C Break Continue]], [[C Structs]]
|
||||||
|
- **참조 맥락:** 배열 섹션 마지막 — 구조체(Structs) 섹션으로 이어짐.
|
||||||
|
|
||||||
|
## 📚 출처 (Sources)
|
||||||
|
- [S1] W3Schools — C Arrays - Real-Life Examples — https://www.w3schools.com/c/c_arrays_reallife.php
|
||||||
|
|
||||||
|
## 📝 변경 이력 (Change history)
|
||||||
|
- 2026-07-04: Initial draft synthesized from the W3Schools "C Arrays - Real-Life Examples" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
---
|
||||||
|
id: c-arrays-size
|
||||||
|
title: "C Array Size"
|
||||||
|
category: "Programming_Language"
|
||||||
|
status: "draft"
|
||||||
|
verification_status: "conceptual"
|
||||||
|
canonical_id: ""
|
||||||
|
aliases: ["sizeof array", "array length formula", "C 배열 크기"]
|
||||||
|
duplicate_of: ""
|
||||||
|
source_trust_level: "B"
|
||||||
|
confidence_score: 0.87
|
||||||
|
created_at: 2026-07-04
|
||||||
|
updated_at: 2026-07-04
|
||||||
|
review_reason: ""
|
||||||
|
merge_history: []
|
||||||
|
tags: ["c", "programming-language", "w3schools", "arrays", "sizeof"]
|
||||||
|
raw_sources: ["https://www.w3schools.com/c/c_arrays_size.php"]
|
||||||
|
applied_in: []
|
||||||
|
github_commit: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# [[C Array Size]]
|
||||||
|
|
||||||
|
## 🎯 한 줄 통찰 (One-line insight)
|
||||||
|
`sizeof(array)` on a 5-element `int` array returns `20`, NOT `5` — a result that looks wrong until you remember `sizeof` reports total BYTES, not element count (4 bytes/int × 5 elements = 20) — meaning getting the actual element count requires an additional division step (`sizeof(arr) / sizeof(arr[0])`), a two-part formula that generalizes to arrays of ANY type since it divides the array's total size by one element's size rather than assuming a fixed per-element byte count. [S1]
|
||||||
|
|
||||||
|
## 🧠 핵심 개념 (Core concepts)
|
||||||
|
- **`sizeof(array)`** — returns the array's TOTAL memory footprint in bytes, not its element count. [S1]
|
||||||
|
- **Element-count formula** — `sizeof(array) / sizeof(array[0])` divides total bytes by one element's byte size, yielding the actual number of elements. [S1]
|
||||||
|
- **Type-agnostic formula** — works identically for `int`, `double`, or any other array element type, since it never hardcodes a byte size. [S1]
|
||||||
|
|
||||||
|
## 📖 세부 내용 (Details)
|
||||||
|
- Raw byte-size result (surprising to beginners): `int myNumbers[] = {10, 25, 50, 75, 100}; printf("%zu", sizeof(myNumbers)); // Prints 20 (not 5)`. [S1]
|
||||||
|
- Correct element-count formula: `int length = sizeof(myNumbers) / sizeof(myNumbers[0]); printf("%d", length); // Prints 5`. [S1]
|
||||||
|
- Same formula applied to a `double` array: `double myValues[] = {1.1, 2.2, 3.3}; int length = sizeof(myValues) / sizeof(myValues[0]); printf("%d", length); // Prints 3`. [S1]
|
||||||
|
|
||||||
|
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||||
|
- **sizeof(배열)은 요소 개수가 아니라 바이트 수를 반환**: 5개짜리 int 배열의 sizeof가 5가 아니라 20(4바이트×5)이라는 점이 초심자에게 혼동을 줄 수 있는 부분으로 명시적으로 설명됨. [S1]
|
||||||
|
|
||||||
|
## 🛠️ 적용 사례 (Applied in summary)
|
||||||
|
현재 발견된 실제 적용 사례가 없습니다 — 이 챕터에서 배운 sizeof(arr)/sizeof(arr[0]) 공식이 다음 챕터(Array Loop)에서 자동으로 크기에 적응하는 반복문을 만드는 데 바로 재사용된다. [S1]
|
||||||
|
|
||||||
|
## 💻 코드 패턴 (Code patterns)
|
||||||
|
The type-agnostic formula for getting an array's actual element count (C):
|
||||||
|
```c
|
||||||
|
int myNumbers[] = {10, 25, 50, 75, 100};
|
||||||
|
int length = sizeof(myNumbers) / sizeof(myNumbers[0]);
|
||||||
|
printf("%d", length); // Prints 5, not 20
|
||||||
|
```
|
||||||
|
|
||||||
|
## ✅ 검증 상태 및 신뢰도
|
||||||
|
- **상태:** draft
|
||||||
|
- **검증 단계:** conceptual
|
||||||
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||||
|
- **신뢰 점수:** 0.87
|
||||||
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||||
|
|
||||||
|
## 🔗 지식 그래프 (Knowledge Graph)
|
||||||
|
- **상위/루트:** [[C Tutorial]]
|
||||||
|
- **관련 개념:** [[C Arrays]], [[C Data Types Sizeof]], [[C Arrays Loop]]
|
||||||
|
- **참조 맥락:** 배열 크기 계산 공식 — 배열 반복문(Arrays Loop) 챕터로 이어짐.
|
||||||
|
|
||||||
|
## 📚 출처 (Sources)
|
||||||
|
- [S1] W3Schools — C Array Size — https://www.w3schools.com/c/c_arrays_size.php
|
||||||
|
|
||||||
|
## 📝 변경 이력 (Change history)
|
||||||
|
- 2026-07-04: Initial draft synthesized from the W3Schools "C Array Size" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
---
|
||||||
|
id: c-bitwise-operators
|
||||||
|
title: "C Bitwise Operators"
|
||||||
|
category: "Programming_Language"
|
||||||
|
status: "draft"
|
||||||
|
verification_status: "conceptual"
|
||||||
|
canonical_id: ""
|
||||||
|
aliases: ["& | ^ ~ << >>", "flags and permissions", "two's complement", "C 비트 연산자"]
|
||||||
|
duplicate_of: ""
|
||||||
|
source_trust_level: "B"
|
||||||
|
confidence_score: 0.86
|
||||||
|
created_at: 2026-07-04
|
||||||
|
updated_at: 2026-07-04
|
||||||
|
review_reason: ""
|
||||||
|
merge_history: []
|
||||||
|
tags: ["c", "programming-language", "w3schools", "operators", "bitwise"]
|
||||||
|
raw_sources: ["https://www.w3schools.com/c/c_bitwise_operators.php"]
|
||||||
|
applied_in: []
|
||||||
|
github_commit: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# [[C Bitwise Operators]]
|
||||||
|
|
||||||
|
## 🎯 한 줄 통찰 (One-line insight)
|
||||||
|
The bitwise NOT example (`~5` = `-6`) only makes sense once you know C stores negative numbers via TWO'S COMPLEMENT — flipping `00000101` (5) bit-by-bit gives `11111010`, which under two's complement representation is interpreted as -6, not some arbitrary large positive number — meaning `~` behaves "unexpectedly" only if you forget that the CPU's negative-number encoding, not simple bit-flipping intuition, determines the final printed value. [S1]
|
||||||
|
|
||||||
|
## 🧠 핵심 개념 (Core concepts)
|
||||||
|
- **Six bitwise operators** — `&` (AND, 1 only if both bits 1), `|` (OR, 1 if either bit 1), `^` (XOR, 1 only if bits differ), `~` (NOT, inverts all bits), `<<` (left shift, multiplies by powers of 2), `>>` (right shift, divides by powers of 2). [S1]
|
||||||
|
- **Integer-only operation** — bitwise operators only work on integer types (`int`, `char`, `long`), not floats. [S1]
|
||||||
|
- **Two's complement interpretation** — `~a` inverting bits produces a result whose printed decimal value depends on how negative numbers are stored (typically two's complement). [S1]
|
||||||
|
- **Flags pattern** — combining multiple boolean options into one integer using distinct bit positions (`#define READ 1`, `#define WRITE 2`, `#define EXEC 4`), then checking each with `&`. [S1]
|
||||||
|
- **Shift as multiply/divide by powers of 2** — `a << n` multiplies `a` by 2ⁿ; `a >> n` divides `a` by 2ⁿ (sign bit may be preserved on signed integers, system-dependent). [S1]
|
||||||
|
|
||||||
|
## 📖 세부 내용 (Details)
|
||||||
|
- Full worked example with `a = 6` (0110) and `b = 3` (0011): `a & b` = 2 (0010), `a | b` = 7 (0111), `a ^ b` = 5 (0101), `~a` = -7 on most systems, `a << 1` = 12 (1100), `a >> 1` = 3 (0011). [S1]
|
||||||
|
- Bitwise NOT and two's complement: `int a = 5; // 00000101 int result = ~a; // -6 on most systems` — because inverted bits `11111010` are interpreted as -6 under two's complement. [S1]
|
||||||
|
- Flags/permissions pattern: `#define READ 1 #define WRITE 2 #define EXEC 4 int permissions = READ | WRITE; if (permissions & READ) { printf("Read allowed\n"); } if (permissions & WRITE) { printf("Write allowed\n"); } if (permissions & EXEC) { printf("Execute allowed\n"); }` — only Read/Write print, since EXEC was never OR'd in. [S1]
|
||||||
|
|
||||||
|
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||||
|
- **~ 연산 결과는 이진수 반전 자체가 아니라 2의 보수 해석에 좌우됨**: 5(00000101)를 반전하면 11111010이 되는데, 이를 그대로 큰 양수로 읽는 것이 아니라 대부분의 시스템에서 -6으로 해석된다는 점(2의 보수 표현)이 명시적으로 설명됨. [S1]
|
||||||
|
|
||||||
|
## 🛠️ 적용 사례 (Applied in summary)
|
||||||
|
READ/WRITE/EXEC 권한을 하나의 정수에 비트 플래그로 저장하고 &로 개별 권한을 검사하는 패턴이 원문에서 직접 실전 활용 사례로 제시됨(파일 시스템 권한 모델의 기초). [S1]
|
||||||
|
|
||||||
|
## 💻 코드 패턴 (Code patterns)
|
||||||
|
Storing multiple boolean options in a single integer using bit flags (C):
|
||||||
|
```c
|
||||||
|
#define READ 1 // 0001
|
||||||
|
#define WRITE 2 // 0010
|
||||||
|
#define EXEC 4 // 0100
|
||||||
|
int permissions = READ | WRITE; // user can read and write
|
||||||
|
if (permissions & READ) { printf("Read allowed\n"); }
|
||||||
|
if (permissions & WRITE) { printf("Write allowed\n"); }
|
||||||
|
if (permissions & EXEC) { printf("Execute allowed\n"); } // not printed
|
||||||
|
```
|
||||||
|
|
||||||
|
## ✅ 검증 상태 및 신뢰도
|
||||||
|
- **상태:** draft
|
||||||
|
- **검증 단계:** conceptual
|
||||||
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||||
|
- **신뢰 점수:** 0.86
|
||||||
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||||
|
|
||||||
|
## 🔗 지식 그래프 (Knowledge Graph)
|
||||||
|
- **상위/루트:** [[C Tutorial]]
|
||||||
|
- **관련 개념:** [[C Operators Logical]], [[C Operators Assignment]], [[C Operators Precedence]]
|
||||||
|
- **참조 맥락:** 비트 연산자 — 연산자 우선순위(Operators Precedence) 챕터로 이어짐.
|
||||||
|
|
||||||
|
## 📚 출처 (Sources)
|
||||||
|
- [S1] W3Schools — C Bitwise Operators — https://www.w3schools.com/c/c_bitwise_operators.php
|
||||||
|
|
||||||
|
## 📝 변경 이력 (Change history)
|
||||||
|
- 2026-07-04: Initial draft synthesized from the W3Schools "C Bitwise Operators" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
---
|
||||||
|
id: c-booleans
|
||||||
|
title: "C Booleans"
|
||||||
|
category: "Programming_Language"
|
||||||
|
status: "draft"
|
||||||
|
verification_status: "conceptual"
|
||||||
|
canonical_id: ""
|
||||||
|
aliases: ["bool type", "stdbool.h", "C 불리언"]
|
||||||
|
duplicate_of: ""
|
||||||
|
source_trust_level: "B"
|
||||||
|
confidence_score: 0.86
|
||||||
|
created_at: 2026-07-04
|
||||||
|
updated_at: 2026-07-04
|
||||||
|
review_reason: ""
|
||||||
|
merge_history: []
|
||||||
|
tags: ["c", "programming-language", "w3schools", "booleans", "stdbool"]
|
||||||
|
raw_sources: ["https://www.w3schools.com/c/c_booleans.php"]
|
||||||
|
applied_in: []
|
||||||
|
github_commit: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# [[C Booleans]]
|
||||||
|
|
||||||
|
## 🎯 한 줄 통찰 (One-line insight)
|
||||||
|
`bool` is NOT a built-in C type like `int` or `char` — it was only added in C99 and requires explicitly including `<stdbool.h>`, meaning code written for older/stricter C standards, or code that forgets this include, has no `bool` keyword at all and must fall back to plain `int` with 1/0 conventions instead. [S1]
|
||||||
|
|
||||||
|
## 🧠 핵심 개념 (Core concepts)
|
||||||
|
- **`bool`** (C99+, via `<stdbool.h>`) — a type representing exactly two values: `true` or `false`. [S1]
|
||||||
|
- **Underlying integer representation** — booleans print as integers: `1` (or any non-zero) for true, `0` for false, using the `%d` specifier. [S1]
|
||||||
|
- **Bool-to-bool comparison** — bool variables can be compared with `==` just like any other value (e.g. checking if two bools are both true). [S1]
|
||||||
|
- **Storing comparison results** — a comparison's result (already a 1/0 value) can be stored directly in a `bool` variable for readability and reuse. [S1]
|
||||||
|
|
||||||
|
## 📖 세부 내용 (Details)
|
||||||
|
- Declaring and printing bools: `bool isProgrammingFun = true; bool isFishTasty = false; printf("%d", isProgrammingFun); // 1 printf("%d", isFishTasty); // 0`. [S1]
|
||||||
|
- Comparing two bool variables: `bool isHamburgerTasty = true; bool isPizzaTasty = true; printf("%d", isHamburgerTasty == isPizzaTasty); // 1`. [S1]
|
||||||
|
- Storing a comparison result in a bool: `int x = 10; int y = 9; bool isGreater = x > y; printf("%d", isGreater); // 1`. [S1]
|
||||||
|
|
||||||
|
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||||
|
- **bool은 C의 내장 타입이 아님**: int나 char와 달리 bool은 C99에서 도입되었고 반드시 <stdbool.h>를 포함해야 사용 가능하다는 점이 명시적으로 강조됨. [S1]
|
||||||
|
|
||||||
|
## 🛠️ 적용 사례 (Applied in summary)
|
||||||
|
현재 발견된 실제 적용 사례가 없습니다 — 비교 결과를 bool 변수에 저장해 재사용하는 것이 코드 가독성을 높이는 실전 습관으로 권장된다. [S1]
|
||||||
|
|
||||||
|
## 💻 코드 패턴 (Code patterns)
|
||||||
|
Storing a comparison's result in a bool variable for readability (C):
|
||||||
|
```c
|
||||||
|
#include <stdbool.h>
|
||||||
|
int x = 10;
|
||||||
|
int y = 9;
|
||||||
|
bool isGreater = x > y;
|
||||||
|
printf("%d", isGreater); // Prints 1 (true)
|
||||||
|
```
|
||||||
|
|
||||||
|
## ✅ 검증 상태 및 신뢰도
|
||||||
|
- **상태:** draft
|
||||||
|
- **검증 단계:** conceptual
|
||||||
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||||
|
- **신뢰 점수:** 0.86
|
||||||
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||||
|
|
||||||
|
## 🔗 지식 그래프 (Knowledge Graph)
|
||||||
|
- **상위/루트:** [[C Tutorial]]
|
||||||
|
- **관련 개념:** [[C Random Numbers]], [[C Operators Comparison]], [[C Booleans RealLife]]
|
||||||
|
- **참조 맥락:** 불리언 섹션 첫 챕터 — 불리언 실전 예제(Booleans RealLife) 챕터로 이어짐.
|
||||||
|
|
||||||
|
## 📚 출처 (Sources)
|
||||||
|
- [S1] W3Schools — C Booleans — https://www.w3schools.com/c/c_booleans.php
|
||||||
|
|
||||||
|
## 📝 변경 이력 (Change history)
|
||||||
|
- 2026-07-04: Initial draft synthesized from the W3Schools "C Booleans" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
---
|
||||||
|
id: c-booleans-reallife
|
||||||
|
title: "C Boolean Examples"
|
||||||
|
category: "Programming_Language"
|
||||||
|
status: "draft"
|
||||||
|
verification_status: "conceptual"
|
||||||
|
canonical_id: ""
|
||||||
|
aliases: ["voting age example", "boolean if-else preview", "C 불리언 실전 예제"]
|
||||||
|
duplicate_of: ""
|
||||||
|
source_trust_level: "B"
|
||||||
|
confidence_score: 0.83
|
||||||
|
created_at: 2026-07-04
|
||||||
|
updated_at: 2026-07-04
|
||||||
|
review_reason: ""
|
||||||
|
merge_history: []
|
||||||
|
tags: ["c", "programming-language", "w3schools", "booleans", "real-life-example"]
|
||||||
|
raw_sources: ["https://www.w3schools.com/c/c_booleans_reallife.php"]
|
||||||
|
applied_in: []
|
||||||
|
github_commit: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# [[C Boolean Examples]]
|
||||||
|
|
||||||
|
## 🎯 한 줄 통찰 (One-line insight)
|
||||||
|
This chapter explicitly reframes the entire preceding Comparison/Boolean material as mere PREPARATION for `if...else` — printing a raw `1` or `0` (as done in every earlier example) is functionally correct but not directly useful to an end user, and the source's own upgrade (wrapping the same comparison in `if (myAge >= votingAge) {...} else {...}`) shows that booleans are the evaluated CONDITION inside control flow, not typically an end product to display as-is. [S1]
|
||||||
|
|
||||||
|
## 🧠 핵심 개념 (Core concepts)
|
||||||
|
- **Comparison as raw output** — printing a comparison directly (`printf("%d", myAge >= votingAge);`) shows 1 or 0, technically correct but not user-friendly. [S1]
|
||||||
|
- **Comparison as an `if` condition** — the SAME comparison expression, placed inside `if (...)`, drives which branch of code executes, producing human-readable output instead of a raw 1/0. [S1]
|
||||||
|
- **Booleans as the foundation of conditions** — the chapter explicitly states booleans "are the basis for all comparisons and conditions," directly foreshadowing the next chapter's Conditions/if-else content. [S1]
|
||||||
|
|
||||||
|
## 📖 세부 내용 (Details)
|
||||||
|
- Raw comparison output: `int myAge = 25; int votingAge = 18; printf("%d", myAge >= votingAge); // Returns 1 (true)`. [S1]
|
||||||
|
- The same logic upgraded into an if...else: `if (myAge >= votingAge) { printf("Old enough to vote!"); } else { printf("Not old enough to vote."); }`. [S1]
|
||||||
|
|
||||||
|
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||||
|
- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources).
|
||||||
|
|
||||||
|
## 🛠️ 적용 사례 (Applied in summary)
|
||||||
|
투표 가능 연령(18세) 확인 로직을 raw 1/0 출력에서 if...else로 업그레이드하는 것이 이 챕터가 직접 보여주는 실전 활용 사례이자, 다음 챕터(Conditions)로의 전환점이다. [S1]
|
||||||
|
|
||||||
|
## 💻 코드 패턴 (Code patterns)
|
||||||
|
The same boolean comparison used inside an if...else for human-readable output (C):
|
||||||
|
```c
|
||||||
|
int myAge = 25;
|
||||||
|
int votingAge = 18;
|
||||||
|
if (myAge >= votingAge) {
|
||||||
|
printf("Old enough to vote!");
|
||||||
|
} else {
|
||||||
|
printf("Not old enough to vote.");
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## ✅ 검증 상태 및 신뢰도
|
||||||
|
- **상태:** draft
|
||||||
|
- **검증 단계:** conceptual
|
||||||
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||||
|
- **신뢰 점수:** 0.83
|
||||||
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||||
|
|
||||||
|
## 🔗 지식 그래프 (Knowledge Graph)
|
||||||
|
- **상위/루트:** [[C Tutorial]]
|
||||||
|
- **관련 개념:** [[C Booleans]], [[C Conditions]]
|
||||||
|
- **참조 맥락:** 불리언 섹션 마지막 — 조건문(Conditions) 섹션으로 직접 이어짐.
|
||||||
|
|
||||||
|
## 📚 출처 (Sources)
|
||||||
|
- [S1] W3Schools — C Boolean Examples — https://www.w3schools.com/c/c_booleans_reallife.php
|
||||||
|
|
||||||
|
## 📝 변경 이력 (Change history)
|
||||||
|
- 2026-07-04: Initial draft synthesized from the W3Schools "C Boolean Examples" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
---
|
||||||
|
id: c-break-continue
|
||||||
|
title: "C Break and Continue"
|
||||||
|
category: "Programming_Language"
|
||||||
|
status: "draft"
|
||||||
|
verification_status: "conceptual"
|
||||||
|
canonical_id: ""
|
||||||
|
aliases: ["break statement", "continue statement", "loop control", "C break continue"]
|
||||||
|
duplicate_of: ""
|
||||||
|
source_trust_level: "B"
|
||||||
|
confidence_score: 0.86
|
||||||
|
created_at: 2026-07-04
|
||||||
|
updated_at: 2026-07-04
|
||||||
|
review_reason: ""
|
||||||
|
merge_history: []
|
||||||
|
tags: ["c", "programming-language", "w3schools", "loops", "break", "continue"]
|
||||||
|
raw_sources: ["https://www.w3schools.com/c/c_break_continue.php"]
|
||||||
|
applied_in: []
|
||||||
|
github_commit: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# [[C Break and Continue]]
|
||||||
|
|
||||||
|
## 🎯 한 줄 통찰 (One-line insight)
|
||||||
|
`break` and `continue` are the same two keywords across BOTH switch statements and loops, but their meaning shifts by context — the source explicitly notes `break` was already seen "jumping out" of a `switch` block, and here it does the analogous thing for a LOOP (stop entirely), while `continue` has no switch equivalent at all — meaning `break`'s core behavior ("exit the current block early") generalizes across constructs, but `continue`'s "skip to next iteration" concept is loop-specific. [S1]
|
||||||
|
|
||||||
|
## 🧠 핵심 개념 (Core concepts)
|
||||||
|
- **`break`** — stops the loop COMPLETELY, immediately, regardless of remaining iterations. [S1]
|
||||||
|
- **`continue`** — skips the REST of the current iteration's body and jumps straight to the next iteration (does not stop the loop). [S1]
|
||||||
|
- **Combinability** — `break` and `continue` can coexist in the same loop, each triggered by different conditions. [S1]
|
||||||
|
- **Works in both `for` and `while` loops** — the same semantics apply regardless of loop type. [S1]
|
||||||
|
- **Real-world pattern: skip-then-stop** — using `continue` to skip invalid/unwanted values while using `break` to halt entirely on a sentinel value (like a zero marking "end of valid data"). [S1]
|
||||||
|
|
||||||
|
## 📖 세부 내용 (Details)
|
||||||
|
- `break` stopping a for loop at i==4: `for (i = 0; i < 10; i++) { if (i == 4) { break; } printf("%d\n", i); }` — prints 0,1,2,3 then stops entirely. [S1]
|
||||||
|
- `continue` skipping just one value: `for (i = 0; i < 10; i++) { if (i == 4) { continue; } printf("%d\n", i); }` — prints 0,1,2,3,5,6,7,8,9 (skips only 4). [S1]
|
||||||
|
- Combined in one loop: `for (i = 0; i < 6; i++) { if (i == 2) { continue; } if (i == 4) { break; } printf("%d\n", i); }` — prints 0,1,3 then stops at 4. [S1]
|
||||||
|
- Real-life skip-negatives-stop-at-zero pattern: `int myNumbers[] = {3, -1, 7, 0, 9}; for (i = 0; i < length; i++) { if (myNumbers[i] < 0) { continue; } if (myNumbers[i] == 0) { break; } printf("%d\n", myNumbers[i]); }` — prints 3 and 7, skips -1, stops entirely at 0 (never reaching 9). [S1]
|
||||||
|
|
||||||
|
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||||
|
- **break와 continue의 근본적 차이**: break는 루프를 완전히 종료하지만 continue는 현재 회차만 건너뛰고 루프는 계속된다는 점이 "Good to Remember" 요약으로 명확히 구분됨. [S1]
|
||||||
|
|
||||||
|
## 🛠️ 적용 사례 (Applied in summary)
|
||||||
|
음수는 건너뛰고(continue) 0을 만나면 완전히 멈추는(break) 숫자 리스트 처리 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1]
|
||||||
|
|
||||||
|
## 💻 코드 패턴 (Code patterns)
|
||||||
|
Combining continue (skip invalid values) and break (stop at a sentinel value) in one loop (C):
|
||||||
|
```c
|
||||||
|
int myNumbers[] = {3, -1, 7, 0, 9};
|
||||||
|
int length = sizeof(myNumbers) / sizeof(myNumbers[0]);
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < length; i++) {
|
||||||
|
if (myNumbers[i] < 0) {
|
||||||
|
continue; // skip negative numbers
|
||||||
|
}
|
||||||
|
if (myNumbers[i] == 0) {
|
||||||
|
break; // stop loop when zero is found
|
||||||
|
}
|
||||||
|
printf("%d\n", myNumbers[i]);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## ✅ 검증 상태 및 신뢰도
|
||||||
|
- **상태:** draft
|
||||||
|
- **검증 단계:** conceptual
|
||||||
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||||
|
- **신뢰 점수:** 0.86
|
||||||
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||||
|
|
||||||
|
## 🔗 지식 그래프 (Knowledge Graph)
|
||||||
|
- **상위/루트:** [[C Tutorial]]
|
||||||
|
- **관련 개념:** [[C For Loop RealLife]], [[C Switch]], [[C Arrays]]
|
||||||
|
- **참조 맥락:** 반복문 섹션 마지막 — 배열(Arrays) 섹션으로 이어짐.
|
||||||
|
|
||||||
|
## 📚 출처 (Sources)
|
||||||
|
- [S1] W3Schools — C Break and Continue — https://www.w3schools.com/c/c_break_continue.php
|
||||||
|
|
||||||
|
## 📝 변경 이력 (Change history)
|
||||||
|
- 2026-07-04: Initial draft synthesized from the W3Schools "C Break and Continue" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
---
|
||||||
|
id: c-comments
|
||||||
|
title: "C Comments"
|
||||||
|
category: "Programming_Language"
|
||||||
|
status: "draft"
|
||||||
|
verification_status: "conceptual"
|
||||||
|
canonical_id: ""
|
||||||
|
aliases: ["single-line comments", "multi-line comments", "C 주석"]
|
||||||
|
duplicate_of: ""
|
||||||
|
source_trust_level: "B"
|
||||||
|
confidence_score: 0.85
|
||||||
|
created_at: 2026-07-04
|
||||||
|
updated_at: 2026-07-04
|
||||||
|
review_reason: ""
|
||||||
|
merge_history: []
|
||||||
|
tags: ["c", "programming-language", "w3schools", "comments"]
|
||||||
|
raw_sources: ["https://www.w3schools.com/c/c_comments.php"]
|
||||||
|
applied_in: []
|
||||||
|
github_commit: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# [[C Comments]]
|
||||||
|
|
||||||
|
## 🎯 한 줄 통찰 (One-line insight)
|
||||||
|
Before C99 (1999), single-line `//` comments were NOT part of standard C at all — only `/* */` multi-line comments existed — meaning `//` comments, now the default choice for short notes, are actually a relatively recent addition to the language's ~50-year history, not an original feature. [S1]
|
||||||
|
|
||||||
|
## 🧠 핵심 개념 (Core concepts)
|
||||||
|
- **Single-line comments (`//`)** — everything from `//` to the end of the line is ignored by the compiler. [S1]
|
||||||
|
- **Multi-line comments (`/* */`)** — everything between the markers is ignored, regardless of line count. [S1]
|
||||||
|
- **Comments as code-disabling tool** — `//` can be prefixed to a line of working code to temporarily disable it during testing, without deleting it. [S1]
|
||||||
|
- **Historical constraint** — pre-C99, only `/* */` was valid; `//` support was added in the C99 standard. [S1]
|
||||||
|
|
||||||
|
## 📖 세부 내용 (Details)
|
||||||
|
- Single-line comment before code: `// This is a comment` followed by `printf("Hello World!");`. [S1]
|
||||||
|
- Single-line comment disabling code: `printf("This will run"); // printf("This will NOT run");`. [S1]
|
||||||
|
- Multi-line comment: `/* The code below will print the words Hello World! to the screen, and it is amazing */ printf("Hello World!");`. [S1]
|
||||||
|
|
||||||
|
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||||
|
- **// 주석의 표준화 시점**: C99(1999) 이전에는 다중 줄 주석(/* */)만 사용 가능했고, 한 줄 주석(//)은 C99부터 표준에 포함되었다는 역사적 사실이 명시됨 — 구형 컴파일러/표준 준수 코드 작성 시 유의해야 할 사항. [S1]
|
||||||
|
|
||||||
|
## 🛠️ 적용 사례 (Applied in summary)
|
||||||
|
현재 발견된 실제 적용 사례가 없습니다 — 특정 코드 줄을 지우지 않고 // 로 임시 비활성화하는 것이 실전 디버깅/테스트에서 흔히 쓰이는 기법이다. [S1]
|
||||||
|
|
||||||
|
## 💻 코드 패턴 (Code patterns)
|
||||||
|
Temporarily disabling a line of code using a single-line comment instead of deleting it (C):
|
||||||
|
```c
|
||||||
|
printf("This will run");
|
||||||
|
// printf("This will NOT run");
|
||||||
|
```
|
||||||
|
|
||||||
|
## ✅ 검증 상태 및 신뢰도
|
||||||
|
- **상태:** draft
|
||||||
|
- **검증 단계:** conceptual
|
||||||
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||||
|
- **신뢰 점수:** 0.85
|
||||||
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||||
|
|
||||||
|
## 🔗 지식 그래프 (Knowledge Graph)
|
||||||
|
- **상위/루트:** [[C Tutorial]]
|
||||||
|
- **관련 개념:** [[C Output]], [[C Organize Code]]
|
||||||
|
- **참조 맥락:** 주석 문법 — 코드 조직화(Organize Code) 챕터로 이어짐.
|
||||||
|
|
||||||
|
## 📚 출처 (Sources)
|
||||||
|
- [S1] W3Schools — C Comments — https://www.w3schools.com/c/c_comments.php
|
||||||
|
|
||||||
|
## 📝 변경 이력 (Change history)
|
||||||
|
- 2026-07-04: Initial draft synthesized from the W3Schools "C Comments" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
---
|
||||||
|
id: c-conditions
|
||||||
|
title: "C If ... Else"
|
||||||
|
category: "Programming_Language"
|
||||||
|
status: "draft"
|
||||||
|
verification_status: "conceptual"
|
||||||
|
canonical_id: ""
|
||||||
|
aliases: ["if statement", "lowercase if", "C 조건문"]
|
||||||
|
duplicate_of: ""
|
||||||
|
source_trust_level: "B"
|
||||||
|
confidence_score: 0.86
|
||||||
|
created_at: 2026-07-04
|
||||||
|
updated_at: 2026-07-04
|
||||||
|
review_reason: ""
|
||||||
|
merge_history: []
|
||||||
|
tags: ["c", "programming-language", "w3schools", "conditions", "if-statement"]
|
||||||
|
raw_sources: ["https://www.w3schools.com/c/c_conditions.php"]
|
||||||
|
applied_in: []
|
||||||
|
github_commit: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# [[C If ... Else]]
|
||||||
|
|
||||||
|
## 🎯 한 줄 통찰 (One-line insight)
|
||||||
|
Case sensitivity isn't just a general C rule mentioned in passing — this chapter singles it out specifically for `if`, explicitly warning that `If` or `IF` will generate an error, meaning the keyword has zero tolerance for capitalization variants despite `if` being one of the most frequently typed words in any C program. [S1]
|
||||||
|
|
||||||
|
## 🧠 핵심 개념 (Core concepts)
|
||||||
|
- **Six comparison conditions** — `<`, `<=`, `>`, `>=`, `==`, `!=`, familiar from mathematics. [S1]
|
||||||
|
- **Four conditional constructs** — `if` (run code if true), `else` (run if false), `else if` (test a new condition if the first is false), `switch` (many alternative code blocks). [S1]
|
||||||
|
- **Case-sensitive keyword** — `if` must be lowercase; `If`/`IF` produce an error. [S1]
|
||||||
|
- **Boolean-variable readability pattern** — storing a comparison's result in a `bool` variable before using it in `if` makes complex or reused conditions easier to read. [S1]
|
||||||
|
|
||||||
|
## 📖 세부 내용 (Details)
|
||||||
|
- Basic if with literal values: `if (20 > 18) { printf("20 is greater than 18"); }`. [S1]
|
||||||
|
- If with variables: `int x = 20; int y = 18; if (x > y) { printf("x is greater than y"); }`. [S1]
|
||||||
|
- Using a boolean variable to hold the condition: `bool isGreater = x > y; if (isGreater) { printf("x is greater than y"); }` (requires `<stdbool.h>`). [S1]
|
||||||
|
|
||||||
|
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||||
|
- **if는 반드시 소문자**: If나 IF처럼 대소문자를 다르게 쓰면 에러가 발생한다는 점이 명시적으로 경고됨. [S1]
|
||||||
|
|
||||||
|
## 🛠️ 적용 사례 (Applied in summary)
|
||||||
|
현재 발견된 실제 적용 사례가 없습니다 — 복잡하거나 재사용되는 조건을 bool 변수에 미리 담아두는 패턴이 가독성 있는 조건문 작성의 실전 관행이다. [S1]
|
||||||
|
|
||||||
|
## 💻 코드 패턴 (Code patterns)
|
||||||
|
Storing a condition in a readable boolean variable before using it in an if statement (C):
|
||||||
|
```c
|
||||||
|
int x = 20;
|
||||||
|
int y = 18;
|
||||||
|
bool isGreater = x > y;
|
||||||
|
if (isGreater) {
|
||||||
|
printf("x is greater than y");
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## ✅ 검증 상태 및 신뢰도
|
||||||
|
- **상태:** draft
|
||||||
|
- **검증 단계:** conceptual
|
||||||
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||||
|
- **신뢰 점수:** 0.86
|
||||||
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||||
|
|
||||||
|
## 🔗 지식 그래프 (Knowledge Graph)
|
||||||
|
- **상위/루트:** [[C Tutorial]]
|
||||||
|
- **관련 개념:** [[C Booleans RealLife]], [[C Conditions Else]]
|
||||||
|
- **참조 맥락:** 조건문 섹션 첫 챕터 — else 문(Conditions Else) 챕터로 이어짐.
|
||||||
|
|
||||||
|
## 📚 출처 (Sources)
|
||||||
|
- [S1] W3Schools — C If ... Else — https://www.w3schools.com/c/c_conditions.php
|
||||||
|
|
||||||
|
## 📝 변경 이력 (Change history)
|
||||||
|
- 2026-07-04: Initial draft synthesized from the W3Schools "C If ... Else" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
---
|
||||||
|
id: c-conditions-else
|
||||||
|
title: "C Else"
|
||||||
|
category: "Programming_Language"
|
||||||
|
status: "draft"
|
||||||
|
verification_status: "conceptual"
|
||||||
|
canonical_id: ""
|
||||||
|
aliases: ["else statement", "C else 문"]
|
||||||
|
duplicate_of: ""
|
||||||
|
source_trust_level: "B"
|
||||||
|
confidence_score: 0.84
|
||||||
|
created_at: 2026-07-04
|
||||||
|
updated_at: 2026-07-04
|
||||||
|
review_reason: ""
|
||||||
|
merge_history: []
|
||||||
|
tags: ["c", "programming-language", "w3schools", "conditions", "else"]
|
||||||
|
raw_sources: ["https://www.w3schools.com/c/c_conditions_else.php"]
|
||||||
|
applied_in: []
|
||||||
|
github_commit: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# [[C Else]]
|
||||||
|
|
||||||
|
## 🎯 한 줄 통찰 (One-line insight)
|
||||||
|
Naming a boolean condition variable descriptively (`isDay` instead of a raw `time < 18` expression) doesn't change the program's behavior at all — it's purely a communication device for future readers — and the source explicitly frames this as its entire justification: "makes it easy to understand what the condition means," not a performance or correctness improvement. [S1]
|
||||||
|
|
||||||
|
## 🧠 핵심 개념 (Core concepts)
|
||||||
|
- **`else`** — runs a block of code when the paired `if` condition is false; there is no separate condition to check for `else` itself. [S1]
|
||||||
|
- **Mutually exclusive branches** — exactly one of the `if` or `else` block executes, never both, never neither. [S1]
|
||||||
|
- **Descriptive boolean naming** — storing a condition in a variable like `isDay` documents the condition's MEANING, not just its mechanics. [S1]
|
||||||
|
|
||||||
|
## 📖 세부 내용 (Details)
|
||||||
|
- Basic if/else: `int time = 20; if (time < 18) { printf("Good day."); } else { printf("Good evening."); } // Outputs "Good evening."`. [S1]
|
||||||
|
- Same logic with a descriptively-named boolean: `bool isDay = time < 18; if (isDay) { printf("Good day."); } else { printf("Good evening."); }`. [S1]
|
||||||
|
|
||||||
|
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||||
|
- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources).
|
||||||
|
|
||||||
|
## 🛠️ 적용 사례 (Applied in summary)
|
||||||
|
시간(time)이 18보다 작은지에 따라 "좋은 하루"/"좋은 저녁"을 출력하는 예제가 원문에서 직접 실전 활용 사례로 제시됨(시간대 기반 인사말 로직). [S1]
|
||||||
|
|
||||||
|
## 💻 코드 패턴 (Code patterns)
|
||||||
|
Naming a boolean condition descriptively for readability (C):
|
||||||
|
```c
|
||||||
|
int time = 20;
|
||||||
|
bool isDay = time < 18;
|
||||||
|
if (isDay) {
|
||||||
|
printf("Good day.");
|
||||||
|
} else {
|
||||||
|
printf("Good evening.");
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## ✅ 검증 상태 및 신뢰도
|
||||||
|
- **상태:** draft
|
||||||
|
- **검증 단계:** conceptual
|
||||||
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||||
|
- **신뢰 점수:** 0.84
|
||||||
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||||
|
|
||||||
|
## 🔗 지식 그래프 (Knowledge Graph)
|
||||||
|
- **상위/루트:** [[C Tutorial]]
|
||||||
|
- **관련 개념:** [[C Conditions]], [[C Conditions ElseIf]]
|
||||||
|
- **참조 맥락:** else 문 — else if 문(Conditions ElseIf) 챕터로 이어짐.
|
||||||
|
|
||||||
|
## 📚 출처 (Sources)
|
||||||
|
- [S1] W3Schools — C Else — https://www.w3schools.com/c/c_conditions_else.php
|
||||||
|
|
||||||
|
## 📝 변경 이력 (Change history)
|
||||||
|
- 2026-07-04: Initial draft synthesized from the W3Schools "C Else" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
---
|
||||||
|
id: c-conditions-elseif
|
||||||
|
title: "C Else If"
|
||||||
|
category: "Programming_Language"
|
||||||
|
status: "draft"
|
||||||
|
verification_status: "conceptual"
|
||||||
|
canonical_id: ""
|
||||||
|
aliases: ["else if chain", "top to bottom evaluation", "C else if 문"]
|
||||||
|
duplicate_of: ""
|
||||||
|
source_trust_level: "B"
|
||||||
|
confidence_score: 0.85
|
||||||
|
created_at: 2026-07-04
|
||||||
|
updated_at: 2026-07-04
|
||||||
|
review_reason: ""
|
||||||
|
merge_history: []
|
||||||
|
tags: ["c", "programming-language", "w3schools", "conditions", "else-if"]
|
||||||
|
raw_sources: ["https://www.w3schools.com/c/c_conditions_elseif.php"]
|
||||||
|
applied_in: []
|
||||||
|
github_commit: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# [[C Else If]]
|
||||||
|
|
||||||
|
## 🎯 한 줄 통찰 (One-line insight)
|
||||||
|
Conditions in an if/else-if chain are checked strictly top-to-bottom and STOP at the first true match — the source's time example explicitly notes "as soon as one condition is true, its block of code runs, and the rest are skipped," meaning even if a later condition would ALSO be true, only the FIRST matching branch ever executes; chain ORDER therefore determines behavior, not just correctness of each individual condition. [S1]
|
||||||
|
|
||||||
|
## 🧠 핵심 개념 (Core concepts)
|
||||||
|
- **`else if`** — tests a new condition only if the preceding condition(s) were false; can be chained multiple times. [S1]
|
||||||
|
- **First-match-wins evaluation** — conditions are checked top to bottom; the FIRST true condition's block runs and all subsequent conditions in the chain are skipped, even if they'd also evaluate true. [S1]
|
||||||
|
- **Boolean-variable chaining** — each condition in the chain can be pre-computed into a descriptively-named bool (`isMorning`, `isDay`) for readability. [S1]
|
||||||
|
|
||||||
|
## 📖 세부 내용 (Details)
|
||||||
|
- Time-of-day chain: `int time = 16; if (time < 12) { printf("Good morning."); } else if (time < 18) { printf("Good day."); } else { printf("Good evening."); } // Outputs "Good day."` — the first condition (`time < 12`) is false, the second (`time < 18`) is true, so only "Good day." prints. [S1]
|
||||||
|
- Same chain with named booleans: `bool isMorning = time < 12; bool isDay = time < 18; if (isMorning) {...} else if (isDay) {...} else {...}`. [S1]
|
||||||
|
|
||||||
|
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||||
|
- **첫 번째로 참인 조건만 실행됨**: 체인 내 여러 조건이 이론상 동시에 참일 수 있어도, 위에서부터 먼저 참으로 판정된 조건의 블록만 실행되고 나머지는 건너뛴다는 점이 명시적으로 강조됨. [S1]
|
||||||
|
|
||||||
|
## 🛠️ 적용 사례 (Applied in summary)
|
||||||
|
현재 발견된 실제 적용 사례가 없습니다 — 시간대에 따라 아침/낮/저녁 인사를 구분하는 것이 else if 체인의 대표적인 실전 활용 예시다. [S1]
|
||||||
|
|
||||||
|
## 💻 코드 패턴 (Code patterns)
|
||||||
|
Chained else-if conditions evaluated top-to-bottom, stopping at the first match (C):
|
||||||
|
```c
|
||||||
|
int time = 16;
|
||||||
|
if (time < 12) {
|
||||||
|
printf("Good morning.");
|
||||||
|
} else if (time < 18) {
|
||||||
|
printf("Good day.");
|
||||||
|
} else {
|
||||||
|
printf("Good evening.");
|
||||||
|
}
|
||||||
|
// Outputs "Good day."
|
||||||
|
```
|
||||||
|
|
||||||
|
## ✅ 검증 상태 및 신뢰도
|
||||||
|
- **상태:** draft
|
||||||
|
- **검증 단계:** conceptual
|
||||||
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||||
|
- **신뢰 점수:** 0.85
|
||||||
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||||
|
|
||||||
|
## 🔗 지식 그래프 (Knowledge Graph)
|
||||||
|
- **상위/루트:** [[C Tutorial]]
|
||||||
|
- **관련 개념:** [[C Conditions Else]], [[C Conditions Short Hand]]
|
||||||
|
- **참조 맥락:** else if 체인 — 삼항 연산자(Conditions Short Hand) 챕터로 이어짐.
|
||||||
|
|
||||||
|
## 📚 출처 (Sources)
|
||||||
|
- [S1] W3Schools — C Else If — https://www.w3schools.com/c/c_conditions_elseif.php
|
||||||
|
|
||||||
|
## 📝 변경 이력 (Change history)
|
||||||
|
- 2026-07-04: Initial draft synthesized from the W3Schools "C Else If" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
---
|
||||||
|
id: c-conditions-logical
|
||||||
|
title: "C Logical Operators in Conditions"
|
||||||
|
category: "Programming_Language"
|
||||||
|
status: "draft"
|
||||||
|
verification_status: "conceptual"
|
||||||
|
canonical_id: ""
|
||||||
|
aliases: ["access control logic", "&& || ! in if", "C 조건문 논리 연산자"]
|
||||||
|
duplicate_of: ""
|
||||||
|
source_trust_level: "B"
|
||||||
|
confidence_score: 0.86
|
||||||
|
created_at: 2026-07-04
|
||||||
|
updated_at: 2026-07-04
|
||||||
|
review_reason: ""
|
||||||
|
merge_history: []
|
||||||
|
tags: ["c", "programming-language", "w3schools", "conditions", "logical-operators"]
|
||||||
|
raw_sources: ["https://www.w3schools.com/c/c_conditions_logical.php"]
|
||||||
|
applied_in: []
|
||||||
|
github_commit: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# [[C Logical Operators in Conditions]]
|
||||||
|
|
||||||
|
## 🎯 한 줄 통찰 (One-line insight)
|
||||||
|
The access-control example composes THREE logical operators into one nested rule — `isLoggedIn && (isAdmin || securityLevel <= 2)` — which the source walks through with four distinct securityLevel values (1, 2, 3, 4) to show the exact boundary where access flips from granted to denied, demonstrating that real authorization logic is rarely a single comparison but a nested AND/OR combination whose behavior must be traced case by case, not just read at a glance. [S1]
|
||||||
|
|
||||||
|
## 🧠 핵심 개념 (Core concepts)
|
||||||
|
- **`&&` (AND) in conditions** — both conditions must be true for the combined condition to be true. [S1]
|
||||||
|
- **`||` (OR) in conditions** — at least one condition must be true. [S1]
|
||||||
|
- **`!` (NOT) in conditions** — reverses a condition's truth value (true↔false); useful for phrasing "check that something is NOT the case." [S1]
|
||||||
|
- **Nested logical composition** — parentheses group sub-conditions (e.g. `(isAdmin || securityLevel <= 2)`) that then combine with another condition via `&&`, mirroring real authorization rules. [S1]
|
||||||
|
|
||||||
|
## 📖 세부 내용 (Details)
|
||||||
|
- AND: `int a = 200, b = 33, c = 500; if (a > b && c > a) { printf("Both conditions are true\n"); }`. [S1]
|
||||||
|
- OR: `if (a > b || a > c) { printf("At least one condition is true\n"); }`. [S1]
|
||||||
|
- NOT: `int a = 33; int b = 200; if (!(a > b)) { printf("a is NOT greater than b\n"); }`. [S1]
|
||||||
|
- Full access-control rule with worked-through outcomes: `bool isLoggedIn = true; bool isAdmin = false; int securityLevel = 3; if (isLoggedIn && (isAdmin || securityLevel <= 2)) { printf("Access granted\n"); } else { printf("Access denied\n"); }` — securityLevel 1 or 2 → granted; 3 or 4 → denied (unless isAdmin is true, which always grants access). [S1]
|
||||||
|
|
||||||
|
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||||
|
- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources).
|
||||||
|
|
||||||
|
## 🛠️ 적용 사례 (Applied in summary)
|
||||||
|
로그인 여부(isLoggedIn) + (관리자이거나(isAdmin) 보안등급이 2 이하(securityLevel <= 2))를 결합한 접근 제어 규칙이 원문에서 직접 실전 활용 사례로 제시됨. [S1]
|
||||||
|
|
||||||
|
## 💻 코드 패턴 (Code patterns)
|
||||||
|
Nested AND/OR logic for a real-world access-control rule (C):
|
||||||
|
```c
|
||||||
|
bool isLoggedIn = true;
|
||||||
|
bool isAdmin = false;
|
||||||
|
int securityLevel = 3; // 1 = highest
|
||||||
|
if (isLoggedIn && (isAdmin || securityLevel <= 2)) {
|
||||||
|
printf("Access granted\n");
|
||||||
|
} else {
|
||||||
|
printf("Access denied\n");
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## ✅ 검증 상태 및 신뢰도
|
||||||
|
- **상태:** draft
|
||||||
|
- **검증 단계:** conceptual
|
||||||
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||||
|
- **신뢰 점수:** 0.86
|
||||||
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||||
|
|
||||||
|
## 🔗 지식 그래프 (Knowledge Graph)
|
||||||
|
- **상위/루트:** [[C Tutorial]]
|
||||||
|
- **관련 개념:** [[C Conditions Short Hand]], [[C Operators Logical]], [[C Conditions Nested]]
|
||||||
|
- **참조 맥락:** 조건문 내 논리 연산자 — 중첩 if(Conditions Nested) 챕터로 이어짐.
|
||||||
|
|
||||||
|
## 📚 출처 (Sources)
|
||||||
|
- [S1] W3Schools — C Logical Operators in Conditions — https://www.w3schools.com/c/c_conditions_logical.php
|
||||||
|
|
||||||
|
## 📝 변경 이력 (Change history)
|
||||||
|
- 2026-07-04: Initial draft synthesized from the W3Schools "C Logical Operators in Conditions" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
---
|
||||||
|
id: c-conditions-nested
|
||||||
|
title: "C Nested If"
|
||||||
|
category: "Programming_Language"
|
||||||
|
status: "draft"
|
||||||
|
verification_status: "conceptual"
|
||||||
|
canonical_id: ""
|
||||||
|
aliases: ["if inside if", "dependent conditions", "C 중첩 if"]
|
||||||
|
duplicate_of: ""
|
||||||
|
source_trust_level: "B"
|
||||||
|
confidence_score: 0.84
|
||||||
|
created_at: 2026-07-04
|
||||||
|
updated_at: 2026-07-04
|
||||||
|
review_reason: ""
|
||||||
|
merge_history: []
|
||||||
|
tags: ["c", "programming-language", "w3schools", "conditions", "nested-if"]
|
||||||
|
raw_sources: ["https://www.w3schools.com/c/c_conditions_nested.php"]
|
||||||
|
applied_in: []
|
||||||
|
github_commit: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# [[C Nested If]]
|
||||||
|
|
||||||
|
## 🎯 한 줄 통찰 (One-line insight)
|
||||||
|
A nested `if` only ever gets EVALUATED at all if the outer condition is true — the voting-and-citizenship example never even checks `isCitizen` if `age >= 18` is false, meaning nesting isn't just visual grouping of related checks, it's a genuine short-circuit optimization where the inner condition's cost (and its own true/false branches) is entirely skipped when the outer gate fails. [S1]
|
||||||
|
|
||||||
|
## 🧠 핵심 개념 (Core concepts)
|
||||||
|
- **Nested if** — placing an `if` statement inside another `if`'s block, so the inner condition is only checked when the outer condition is already true. [S1]
|
||||||
|
- **Dependent condition modeling** — naturally expresses "check B only if A holds" logic, like age eligibility gating a citizenship check. [S1]
|
||||||
|
- **Depth caution** — the source explicitly warns against nesting too deeply, as it can hurt readability; nested if is commonly combined with `else`/`else if` for richer decision trees. [S1]
|
||||||
|
|
||||||
|
## 📖 세부 내용 (Details)
|
||||||
|
- Basic two-level nesting: `int x = 15; int y = 25; if (x > 10) { printf("x is greater than 10\n"); if (y > 20) { printf("y is also greater than 20\n"); } }` — both print since both conditions hold. [S1]
|
||||||
|
- Voting + citizenship real-life example: `int age = 20; bool isCitizen = true; if (age >= 18) { printf("Old enough to vote.\n"); if (isCitizen) { printf("And you are a citizen, so you can vote!\n"); } else { printf("But you must be a citizen to vote.\n"); } } else { printf("Not old enough to vote.\n"); }`. [S1]
|
||||||
|
|
||||||
|
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||||
|
- **중첩 if의 단축 평가 효과**: 바깥 조건이 거짓이면 안쪽 if의 조건 자체가 아예 평가되지 않는다는 점이 나이/시민권 예제로 확인됨 — 관련 없는 하위 조건을 불필요하게 검사하지 않는 효율성을 제공. [S1]
|
||||||
|
|
||||||
|
## 🛠️ 적용 사례 (Applied in summary)
|
||||||
|
투표 가능 연령(18세 이상)을 먼저 확인하고, 그 안에서만 시민권 여부를 추가로 확인하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1]
|
||||||
|
|
||||||
|
## 💻 코드 패턴 (Code patterns)
|
||||||
|
An inner condition (citizenship) checked only when the outer condition (age) already holds (C):
|
||||||
|
```c
|
||||||
|
int age = 20;
|
||||||
|
bool isCitizen = true;
|
||||||
|
if (age >= 18) {
|
||||||
|
printf("Old enough to vote.\n");
|
||||||
|
if (isCitizen) {
|
||||||
|
printf("And you are a citizen, so you can vote!\n");
|
||||||
|
} else {
|
||||||
|
printf("But you must be a citizen to vote.\n");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
printf("Not old enough to vote.\n");
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## ✅ 검증 상태 및 신뢰도
|
||||||
|
- **상태:** draft
|
||||||
|
- **검증 단계:** conceptual
|
||||||
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||||
|
- **신뢰 점수:** 0.84
|
||||||
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||||
|
|
||||||
|
## 🔗 지식 그래프 (Knowledge Graph)
|
||||||
|
- **상위/루트:** [[C Tutorial]]
|
||||||
|
- **관련 개념:** [[C Conditions Logical]], [[C Conditions RealLife]]
|
||||||
|
- **참조 맥락:** 중첩 if — 조건문 실전 예제(Conditions RealLife) 챕터로 이어짐.
|
||||||
|
|
||||||
|
## 📚 출처 (Sources)
|
||||||
|
- [S1] W3Schools — C Nested If — https://www.w3schools.com/c/c_conditions_nested.php
|
||||||
|
|
||||||
|
## 📝 변경 이력 (Change history)
|
||||||
|
- 2026-07-04: Initial draft synthesized from the W3Schools "C Nested If" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
---
|
||||||
|
id: c-conditions-reallife
|
||||||
|
title: "C If ... Else Examples"
|
||||||
|
category: "Programming_Language"
|
||||||
|
status: "draft"
|
||||||
|
verification_status: "conceptual"
|
||||||
|
canonical_id: ""
|
||||||
|
aliases: ["real-life if else", "even or odd example", "C 조건문 실전 예제"]
|
||||||
|
duplicate_of: ""
|
||||||
|
source_trust_level: "B"
|
||||||
|
confidence_score: 0.83
|
||||||
|
created_at: 2026-07-04
|
||||||
|
updated_at: 2026-07-04
|
||||||
|
review_reason: ""
|
||||||
|
merge_history: []
|
||||||
|
tags: ["c", "programming-language", "w3schools", "conditions", "real-life-example"]
|
||||||
|
raw_sources: ["https://www.w3schools.com/c/c_conditions_reallife.php"]
|
||||||
|
applied_in: []
|
||||||
|
github_commit: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# [[C If ... Else Examples]]
|
||||||
|
|
||||||
|
## 🎯 한 줄 통찰 (One-line insight)
|
||||||
|
The even/odd checker reuses the `%` modulus operator from the Arithmetic Operators chapter for a purpose that has nothing to do with "remainder after division" in the everyday sense — `myNum % 2 == 0` is the standard idiom for parity checking, showing that modulus's real-world utility often lies in binary classification (even/odd, every-Nth) rather than literal division-remainder arithmetic. [S1]
|
||||||
|
|
||||||
|
## 🧠 핵심 개념 (Core concepts)
|
||||||
|
- **This chapter is a compilation** — six worked real-life if/else scenarios, consolidating patterns from every prior Conditions sub-chapter (basic if/else, else-if chains, nested if, logical operators). [S1]
|
||||||
|
- **Door-code check** — a single `==` equality check gating access. [S1]
|
||||||
|
- **Positive/negative/zero classification** — a three-way `if`/`else if`/`else` chain covering all three number sign cases. [S1]
|
||||||
|
- **Even/odd via modulus** — `num % 2 == 0` is the standard parity-check idiom. [S1]
|
||||||
|
- **Temperature banding** — a three-tier `if`/`else if`/`else` chain (freezing/cool/warm) based on numeric thresholds. [S1]
|
||||||
|
|
||||||
|
## 📖 세부 내용 (Details)
|
||||||
|
- Door code check: `int doorCode = 1337; if (doorCode == 1337) { printf("Correct code.\nThe door is now open."); } else { printf("Wrong code.\nThe door remains closed."); }`. [S1]
|
||||||
|
- Positive/negative/zero: `int myNum = 10; if (myNum > 0) { printf("The value is a positive number."); } else if (myNum < 0) { printf("The value is a negative number."); } else { printf("The value is 0."); }`. [S1]
|
||||||
|
- Even/odd check: `int myNum = 5; if (myNum % 2 == 0) { printf("%d is even.\n", myNum); } else { printf("%d is odd.\n", myNum); }`. [S1]
|
||||||
|
- Temperature banding: `int temperature = 30; if (temperature < 0) { printf("It's freezing!\n"); } else if (temperature < 20) { printf("It's cool.\n"); } else { printf("It's warm.\n"); }`. [S1]
|
||||||
|
|
||||||
|
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||||
|
- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources).
|
||||||
|
|
||||||
|
## 🛠️ 적용 사례 (Applied in summary)
|
||||||
|
도어락 코드 확인, 숫자 부호 판별, 짝/홀수 판별, 온도 구간 분류, 접근 제어 등 6가지 실전 시나리오가 원문에서 직접 제시되며, 각각이 조건문 섹션 전체를 종합한 실전 활용 사례다. [S1]
|
||||||
|
|
||||||
|
## 💻 코드 패턴 (Code patterns)
|
||||||
|
The standard parity-check idiom using the modulus operator (C):
|
||||||
|
```c
|
||||||
|
int myNum = 5;
|
||||||
|
if (myNum % 2 == 0) {
|
||||||
|
printf("%d is even.\n", myNum);
|
||||||
|
} else {
|
||||||
|
printf("%d is odd.\n", myNum);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## ✅ 검증 상태 및 신뢰도
|
||||||
|
- **상태:** draft
|
||||||
|
- **검증 단계:** conceptual
|
||||||
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||||
|
- **신뢰 점수:** 0.83
|
||||||
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||||
|
|
||||||
|
## 🔗 지식 그래프 (Knowledge Graph)
|
||||||
|
- **상위/루트:** [[C Tutorial]]
|
||||||
|
- **관련 개념:** [[C Conditions Nested]], [[C Operators Arithmetic]], [[C Switch]]
|
||||||
|
- **참조 맥락:** 조건문 섹션 마지막 — switch 문(Switch) 섹션으로 이어짐.
|
||||||
|
|
||||||
|
## 📚 출처 (Sources)
|
||||||
|
- [S1] W3Schools — C If ... Else Examples — https://www.w3schools.com/c/c_conditions_reallife.php
|
||||||
|
|
||||||
|
## 📝 변경 이력 (Change history)
|
||||||
|
- 2026-07-04: Initial draft synthesized from the W3Schools "C If ... Else Examples" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
---
|
||||||
|
id: c-conditions-short-hand
|
||||||
|
title: "C Short Hand If Else"
|
||||||
|
category: "Programming_Language"
|
||||||
|
status: "draft"
|
||||||
|
verification_status: "conceptual"
|
||||||
|
canonical_id: ""
|
||||||
|
aliases: ["ternary operator", "condition ? true : false", "C 삼항 연산자"]
|
||||||
|
duplicate_of: ""
|
||||||
|
source_trust_level: "B"
|
||||||
|
confidence_score: 0.84
|
||||||
|
created_at: 2026-07-04
|
||||||
|
updated_at: 2026-07-04
|
||||||
|
review_reason: ""
|
||||||
|
merge_history: []
|
||||||
|
tags: ["c", "programming-language", "w3schools", "conditions", "ternary-operator"]
|
||||||
|
raw_sources: ["https://www.w3schools.com/c/c_conditions_short_hand.php"]
|
||||||
|
applied_in: []
|
||||||
|
github_commit: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# [[C Short Hand If Else]]
|
||||||
|
|
||||||
|
## 🎯 한 줄 통찰 (One-line insight)
|
||||||
|
The ternary operator is explicitly named for its OPERAND COUNT — "because it uses three operands" (condition, true-expression, false-expression) — not because of any special syntax category, meaning it's simply the only operator in C that takes three arguments rather than the usual one or two, which is why it stands out enough to warrant special naming. [S1]
|
||||||
|
|
||||||
|
## 🧠 핵심 개념 (Core concepts)
|
||||||
|
- **Ternary operator (`?:`)** — a shorthand if/else that RETURNS a value rather than branching execution; syntax: `variable = (condition) ? expressionTrue : expressionFalse;`. [S1]
|
||||||
|
- **Three operands** — condition, true-branch expression, false-branch expression — the origin of the name "ternary." [S1]
|
||||||
|
- **Equivalent to a simple if/else** — best suited for replacing straightforward two-branch if/else statements, not complex multi-branch logic. [S1]
|
||||||
|
- **Stylistic choice** — the source explicitly states it's "completely up to you" whether to use traditional if/else or the ternary form. [S1]
|
||||||
|
|
||||||
|
## 📖 세부 내용 (Details)
|
||||||
|
- Traditional if/else form: `int time = 20; if (time < 18) { printf("Good day."); } else { printf("Good evening."); }`. [S1]
|
||||||
|
- Equivalent one-line ternary form: `int time = 20; (time < 18) ? printf("Good day.") : printf("Good evening.");`. [S1]
|
||||||
|
|
||||||
|
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||||
|
- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources).
|
||||||
|
|
||||||
|
## 🛠️ 적용 사례 (Applied in summary)
|
||||||
|
현재 발견된 실제 적용 사례가 없습니다 — 시간에 따른 인사말 출력을 한 줄로 압축하는 예제가 삼항 연산자의 대표 실전 활용이다. [S1]
|
||||||
|
|
||||||
|
## 💻 코드 패턴 (Code patterns)
|
||||||
|
A simple if/else compressed into one line using the ternary operator (C):
|
||||||
|
```c
|
||||||
|
int time = 20;
|
||||||
|
(time < 18) ? printf("Good day.") : printf("Good evening.");
|
||||||
|
```
|
||||||
|
|
||||||
|
## ✅ 검증 상태 및 신뢰도
|
||||||
|
- **상태:** draft
|
||||||
|
- **검증 단계:** conceptual
|
||||||
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||||
|
- **신뢰 점수:** 0.84
|
||||||
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||||
|
|
||||||
|
## 🔗 지식 그래프 (Knowledge Graph)
|
||||||
|
- **상위/루트:** [[C Tutorial]]
|
||||||
|
- **관련 개념:** [[C Conditions ElseIf]], [[C Conditions Logical]]
|
||||||
|
- **참조 맥락:** 삼항 연산자 — 조건문 내 논리 연산자(Conditions Logical) 챕터로 이어짐.
|
||||||
|
|
||||||
|
## 📚 출처 (Sources)
|
||||||
|
- [S1] W3Schools — C Short Hand If Else — https://www.w3schools.com/c/c_conditions_short_hand.php
|
||||||
|
|
||||||
|
## 📝 변경 이력 (Change history)
|
||||||
|
- 2026-07-04: Initial draft synthesized from the W3Schools "C Short Hand If Else" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
---
|
||||||
|
id: c-constants
|
||||||
|
title: "C Constants"
|
||||||
|
category: "Programming_Language"
|
||||||
|
status: "draft"
|
||||||
|
verification_status: "conceptual"
|
||||||
|
canonical_id: ""
|
||||||
|
aliases: ["const keyword", "read-only variables", "C 상수"]
|
||||||
|
duplicate_of: ""
|
||||||
|
source_trust_level: "B"
|
||||||
|
confidence_score: 0.85
|
||||||
|
created_at: 2026-07-04
|
||||||
|
updated_at: 2026-07-04
|
||||||
|
review_reason: ""
|
||||||
|
merge_history: []
|
||||||
|
tags: ["c", "programming-language", "w3schools", "constants"]
|
||||||
|
raw_sources: ["https://www.w3schools.com/c/c_constants.php"]
|
||||||
|
applied_in: []
|
||||||
|
github_commit: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# [[C Constants]]
|
||||||
|
|
||||||
|
## 🎯 한 줄 통찰 (One-line insight)
|
||||||
|
A `const` variable MUST be assigned a value at the moment of declaration — declaring it first and assigning later (`const int minutesPerHour; minutesPerHour = 60;`) is explicitly shown as an error — meaning `const` isn't just "can't change later," it also removes the two-step declare-then-assign pattern that ordinary variables freely support. [S1]
|
||||||
|
|
||||||
|
## 🧠 핵심 개념 (Core concepts)
|
||||||
|
- **`const` keyword** — makes a variable unchangeable/read-only after its initial assignment. [S1]
|
||||||
|
- **Mandatory initialization** — a `const` variable must receive its value at declaration time; assigning it afterward is a compile error. [S1]
|
||||||
|
- **Uppercase naming convention** — while not required, C programmers commonly write constant names in uppercase (e.g. `BIRTHYEAR`) for readability. [S1]
|
||||||
|
- **Use case** — values unlikely to ever change during program execution (e.g. `minutesPerHour`, `monthsInYear`). [S1]
|
||||||
|
|
||||||
|
## 📖 세부 내용 (Details)
|
||||||
|
- Attempting reassignment fails: `const int myNum = 15; myNum = 10; // error: assignment of read-only variable 'myNum'`. [S1]
|
||||||
|
- Declare-without-assign fails: `const int minutesPerHour; minutesPerHour = 60; // error`. [S1]
|
||||||
|
- Uppercase convention: `const int BIRTHYEAR = 1980;`. [S1]
|
||||||
|
|
||||||
|
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||||
|
- **const는 선언과 동시에 초기화 필수**: 일반 변수처럼 먼저 선언만 하고 나중에 값을 대입하는 방식이 const에서는 컴파일 에러를 발생시킨다는 점이 명시적으로 확인됨. [S1]
|
||||||
|
|
||||||
|
## 🛠️ 적용 사례 (Applied in summary)
|
||||||
|
현재 발견된 실제 적용 사례가 없습니다 — 시간당 분(60), 연중 개월 수(12)처럼 절대 변하지 않는 값을 const로 선언하는 것이 실전 코드에서의 표준 활용이다. [S1]
|
||||||
|
|
||||||
|
## 💻 코드 패턴 (Code patterns)
|
||||||
|
Declaring constants that must be initialized at the point of declaration (C):
|
||||||
|
```c
|
||||||
|
const int minutesPerHour = 60;
|
||||||
|
const int monthsInYear = 12;
|
||||||
|
const int BIRTHYEAR = 1980; // uppercase is a common naming convention
|
||||||
|
```
|
||||||
|
|
||||||
|
## ✅ 검증 상태 및 신뢰도
|
||||||
|
- **상태:** draft
|
||||||
|
- **검증 단계:** conceptual
|
||||||
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||||
|
- **신뢰 점수:** 0.85
|
||||||
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||||
|
|
||||||
|
## 🔗 지식 그래프 (Knowledge Graph)
|
||||||
|
- **상위/루트:** [[C Tutorial]]
|
||||||
|
- **관련 개념:** [[C Data Types RealLife]], [[C Storage Classes]]
|
||||||
|
- **참조 맥락:** 상수 선언 — 저장 클래스(Storage Classes) 챕터로 이어짐.
|
||||||
|
|
||||||
|
## 📚 출처 (Sources)
|
||||||
|
- [S1] W3Schools — C Constants — https://www.w3schools.com/c/c_constants.php
|
||||||
|
|
||||||
|
## 📝 변경 이력 (Change history)
|
||||||
|
- 2026-07-04: Initial draft synthesized from the W3Schools "C Constants" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
---
|
||||||
|
id: c-data-types
|
||||||
|
title: "C Data Types"
|
||||||
|
category: "Programming_Language"
|
||||||
|
status: "draft"
|
||||||
|
verification_status: "conceptual"
|
||||||
|
canonical_id: ""
|
||||||
|
aliases: ["int float double char", "format specifiers table", "C 데이터 타입"]
|
||||||
|
duplicate_of: ""
|
||||||
|
source_trust_level: "B"
|
||||||
|
confidence_score: 0.87
|
||||||
|
created_at: 2026-07-04
|
||||||
|
updated_at: 2026-07-04
|
||||||
|
review_reason: ""
|
||||||
|
merge_history: []
|
||||||
|
tags: ["c", "programming-language", "w3schools", "data-types"]
|
||||||
|
raw_sources: ["https://www.w3schools.com/c/c_data_types.php"]
|
||||||
|
applied_in: []
|
||||||
|
github_commit: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# [[C Data Types]]
|
||||||
|
|
||||||
|
## 🎯 한 줄 통찰 (One-line insight)
|
||||||
|
The source's explicit warning — "if not [using the correct format specifier], the program may produce errors or even crash" — reveals that in C, a format specifier mismatch isn't just a display glitch like in more forgiving languages; it can cause undefined behavior or a crash, because `printf()` blindly trusts the specifier to know how many bytes to read from the argument list. [S1]
|
||||||
|
|
||||||
|
## 🧠 핵심 개념 (Core concepts)
|
||||||
|
- **Four basic types** — `int` (2 or 4 bytes, whole numbers), `float` (4 bytes, ~6-7 decimal digit precision), `double` (8 bytes, ~15 decimal digit precision), `char` (1 byte, single character/ASCII value). [S1]
|
||||||
|
- **Type-specific format specifiers** — `%d`/`%i` (int), `%f`/`%F` (float), `%lf` (double), `%c` (char), `%s` (string, covered later). [S1]
|
||||||
|
- **Mismatch risk** — using the wrong specifier for a type can cause errors or crashes, not just wrong output. [S1]
|
||||||
|
|
||||||
|
## 📖 세부 내용 (Details)
|
||||||
|
- Four types declared and printed together: `int myNum = 5; float myFloatNum = 5.99; char myLetter = 'D'; printf("%d\n", myNum); printf("%f\n", myFloatNum); printf("%c\n", myLetter);`. [S1]
|
||||||
|
- Format specifier reference table: int→`%d`/`%i`, float→`%f`/`%F`, double→`%lf`, char→`%c`, string→`%s`. [S1]
|
||||||
|
|
||||||
|
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||||
|
- **잘못된 포맷 지정자의 실질적 위험**: 단순 출력 오류가 아니라 프로그램이 크래시할 수도 있다는 점이 명시적으로 경고됨 — printf()가 지정자만 보고 인자 크기를 추정하기 때문. [S1]
|
||||||
|
|
||||||
|
## 🛠️ 적용 사례 (Applied in summary)
|
||||||
|
현재 발견된 실제 적용 사례가 없습니다 — 정수/실수/문자 네 가지 기본 타입을 상황에 맞게 선택하는 것이 이후 모든 C 챕터의 기초가 된다. [S1]
|
||||||
|
|
||||||
|
## 💻 코드 패턴 (Code patterns)
|
||||||
|
The four basic C data types printed with their matching format specifiers:
|
||||||
|
```c
|
||||||
|
int myNum = 5; // Integer (whole number)
|
||||||
|
float myFloatNum = 5.99; // Floating point number
|
||||||
|
char myLetter = 'D'; // Character
|
||||||
|
printf("%d\n", myNum);
|
||||||
|
printf("%f\n", myFloatNum);
|
||||||
|
printf("%c\n", myLetter);
|
||||||
|
```
|
||||||
|
|
||||||
|
## ✅ 검증 상태 및 신뢰도
|
||||||
|
- **상태:** draft
|
||||||
|
- **검증 단계:** conceptual
|
||||||
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||||
|
- **신뢰 점수:** 0.87
|
||||||
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||||
|
|
||||||
|
## 🔗 지식 그래프 (Knowledge Graph)
|
||||||
|
- **상위/루트:** [[C Tutorial]]
|
||||||
|
- **관련 개념:** [[C Variables Format]], [[C Data Types Numbers]], [[C Data Types Characters]]
|
||||||
|
- **참조 맥락:** 데이터 타입 섹션 첫 챕터 — 숫자형 타입 상세(Data Types Numbers) 챕터로 이어짐.
|
||||||
|
|
||||||
|
## 📚 출처 (Sources)
|
||||||
|
- [S1] W3Schools — C Data Types — https://www.w3schools.com/c/c_data_types.php
|
||||||
|
|
||||||
|
## 📝 변경 이력 (Change history)
|
||||||
|
- 2026-07-04: Initial draft synthesized from the W3Schools "C Data Types" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
---
|
||||||
|
id: c-data-types-characters
|
||||||
|
title: "C Character Data Types"
|
||||||
|
category: "Programming_Language"
|
||||||
|
status: "draft"
|
||||||
|
verification_status: "conceptual"
|
||||||
|
canonical_id: ""
|
||||||
|
aliases: ["char type", "ASCII values", "C 문자 타입"]
|
||||||
|
duplicate_of: ""
|
||||||
|
source_trust_level: "B"
|
||||||
|
confidence_score: 0.85
|
||||||
|
created_at: 2026-07-04
|
||||||
|
updated_at: 2026-07-04
|
||||||
|
review_reason: ""
|
||||||
|
merge_history: []
|
||||||
|
tags: ["c", "programming-language", "w3schools", "data-types", "char", "ascii"]
|
||||||
|
raw_sources: ["https://www.w3schools.com/c/c_data_types_characters.php"]
|
||||||
|
applied_in: []
|
||||||
|
github_commit: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# [[C Character Data Types]]
|
||||||
|
|
||||||
|
## 🎯 한 줄 통찰 (One-line insight)
|
||||||
|
Assigning multiple characters to a single `char` variable (`char myText = 'Hello';`) doesn't raise an error — it silently prints only the LAST character — meaning `char`'s single-character limit is a silent-failure trap rather than a compile-time guard, and the source explicitly warns not to rely on it for anything beyond one character. [S1]
|
||||||
|
|
||||||
|
## 🧠 핵심 개념 (Core concepts)
|
||||||
|
- **`char`** — stores exactly one character, written in single quotes (`'A'`), printed with `%c`. [S1]
|
||||||
|
- **ASCII value assignment** — `char` variables can be assigned numeric ASCII codes directly (no quotes, since it's a number, not a literal character) and still print as the corresponding character via `%c`. [S1]
|
||||||
|
- **Silent truncation on multi-character assignment** — `char myText = 'Hello';` compiles but only stores/prints the LAST character, with no error raised. [S1]
|
||||||
|
- **Strings for multi-character text** — `char myText[] = "Hello";` (a character array, printed with `%s`) is the correct tool for multi-character text, not a bare `char`. [S1]
|
||||||
|
|
||||||
|
## 📖 세부 내용 (Details)
|
||||||
|
- Basic char: `char myGrade = 'A'; printf("%c", myGrade);`. [S1]
|
||||||
|
- ASCII numeric assignment: `char a = 65, b = 66, c = 67; printf("%c", a); printf("%c", b); printf("%c", c);` — prints A, B, C. [S1]
|
||||||
|
- The silent-truncation trap: `char myText = 'Hello'; printf("%c", myText);` — prints only the last character, with no compiler error. [S1]
|
||||||
|
- Correct multi-character storage: `char myText[] = "Hello"; printf("%s", myText);`. [S1]
|
||||||
|
|
||||||
|
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||||
|
- **char에 여러 문자 대입 시 조용한 실패**: 'Hello'처럼 여러 문자를 char 변수에 대입해도 에러 없이 컴파일되지만 마지막 문자만 저장/출력된다는 점이 명시적으로 경고됨 — 여러 문자에는 반드시 문자열(char 배열)을 써야 함. [S1]
|
||||||
|
|
||||||
|
## 🛠️ 적용 사례 (Applied in summary)
|
||||||
|
현재 발견된 실제 적용 사례가 없습니다 — ASCII 코드값(65,66,67)을 직접 char에 대입해 A/B/C를 출력하는 패턴이 문자와 숫자 표현이 내부적으로 같다는 것을 보여주는 실전 예시다. [S1]
|
||||||
|
|
||||||
|
## 💻 코드 패턴 (Code patterns)
|
||||||
|
Assigning ASCII numeric codes directly to char variables (C):
|
||||||
|
```c
|
||||||
|
char a = 65, b = 66, c = 67;
|
||||||
|
printf("%c", a); // A
|
||||||
|
printf("%c", b); // B
|
||||||
|
printf("%c", c); // C
|
||||||
|
```
|
||||||
|
|
||||||
|
## ✅ 검증 상태 및 신뢰도
|
||||||
|
- **상태:** draft
|
||||||
|
- **검증 단계:** conceptual
|
||||||
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||||
|
- **신뢰 점수:** 0.85
|
||||||
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||||
|
|
||||||
|
## 🔗 지식 그래프 (Knowledge Graph)
|
||||||
|
- **상위/루트:** [[C Tutorial]]
|
||||||
|
- **관련 개념:** [[C Data Types Numbers]], [[C Data Types Dec]], [[C Strings]]
|
||||||
|
- **참조 맥락:** 문자 타입과 ASCII — 소수점 정밀도(Data Types Dec) 챕터로 이어짐.
|
||||||
|
|
||||||
|
## 📚 출처 (Sources)
|
||||||
|
- [S1] W3Schools — C Character Data Types — https://www.w3schools.com/c/c_data_types_characters.php
|
||||||
|
|
||||||
|
## 📝 변경 이력 (Change history)
|
||||||
|
- 2026-07-04: Initial draft synthesized from the W3Schools "C Character Data Types" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
---
|
||||||
|
id: c-data-types-dec
|
||||||
|
title: "C Decimal Precision"
|
||||||
|
category: "Programming_Language"
|
||||||
|
status: "draft"
|
||||||
|
verification_status: "conceptual"
|
||||||
|
canonical_id: ""
|
||||||
|
aliases: ["%.2f", "decimal precision", "C 소수점 자리수"]
|
||||||
|
duplicate_of: ""
|
||||||
|
source_trust_level: "B"
|
||||||
|
confidence_score: 0.84
|
||||||
|
created_at: 2026-07-04
|
||||||
|
updated_at: 2026-07-04
|
||||||
|
review_reason: ""
|
||||||
|
merge_history: []
|
||||||
|
tags: ["c", "programming-language", "w3schools", "data-types", "printf", "precision"]
|
||||||
|
raw_sources: ["https://www.w3schools.com/c/c_data_types_dec.php"]
|
||||||
|
applied_in: []
|
||||||
|
github_commit: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
# [[C Decimal Precision]]
|
||||||
|
|
||||||
|
## 🎯 한 줄 통찰 (One-line insight)
|
||||||
|
By default `%f` always pads a float/double out to 6 digits after the decimal point regardless of how few digits the actual value has (`3.5` prints as `3.500000`) — meaning the visible "extra zeros" problem beginners see isn't a bug in their number, it's `%f`'s fixed default precision, controllable only by inserting a `.N` modifier between `%` and `f`. [S1]
|
||||||
|
|
||||||
|
## 🧠 핵심 개념 (Core concepts)
|
||||||
|
- **Default `%f` precision** — always shows 6 digits after the decimal point, padding with zeros if the actual value has fewer. [S1]
|
||||||
|
- **`.N` precision modifier** — inserting `.N` between `%` and `f` (e.g. `%.2f`) limits output to exactly N digits after the decimal point. [S1]
|
||||||
|
- **Applies to both float and double** — the precision modifier syntax works the same way regardless of which type is being printed. [S1]
|
||||||
|
|
||||||
|
## 📖 세부 내용 (Details)
|
||||||
|
- Default padding behavior: `float myFloatNum = 3.5; printf("%f\n", myFloatNum); // Outputs 3.500000`. [S1]
|
||||||
|
- Controlling precision: `printf("%.1f\n", myFloatNum); // Only show 1 digit` / `printf("%.2f\n", myFloatNum); // Only show 2 digits` / `printf("%.4f", myFloatNum); // Only show 4 digits`. [S1]
|
||||||
|
|
||||||
|
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||||
|
- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources).
|
||||||
|
|
||||||
|
## 🛠️ 적용 사례 (Applied in summary)
|
||||||
|
현재 발견된 실제 적용 사례가 없습니다 — %.2f로 소수점 둘째 자리까지만 표시하는 것이 통화 금액 출력(다음 Real-Life 예제의 총 비용 계산) 같은 실전 상황에서 표준적으로 쓰인다. [S1]
|
||||||
|
|
||||||
|
## 💻 코드 패턴 (Code patterns)
|
||||||
|
Controlling how many decimal digits printf() shows (C):
|
||||||
|
```c
|
||||||
|
float myFloatNum = 3.5;
|
||||||
|
printf("%f\n", myFloatNum); // Default: 3.500000
|
||||||
|
printf("%.1f\n", myFloatNum); // 3.5
|
||||||
|
printf("%.2f\n", myFloatNum); // 3.50
|
||||||
|
printf("%.4f", myFloatNum); // 3.5000
|
||||||
|
```
|
||||||
|
|
||||||
|
## ✅ 검증 상태 및 신뢰도
|
||||||
|
- **상태:** draft
|
||||||
|
- **검증 단계:** conceptual
|
||||||
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||||
|
- **신뢰 점수:** 0.84
|
||||||
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||||
|
|
||||||
|
## 🔗 지식 그래프 (Knowledge Graph)
|
||||||
|
- **상위/루트:** [[C Tutorial]]
|
||||||
|
- **관련 개념:** [[C Data Types Characters]], [[C Data Types Extended]], [[C Data Types RealLife]]
|
||||||
|
- **참조 맥락:** 소수점 정밀도 제어 — 확장 타입(Data Types Extended) 챕터로 이어짐.
|
||||||
|
|
||||||
|
## 📚 출처 (Sources)
|
||||||
|
- [S1] W3Schools — C Decimal Precision — https://www.w3schools.com/c/c_data_types_dec.php
|
||||||
|
|
||||||
|
## 📝 변경 이력 (Change history)
|
||||||
|
- 2026-07-04: Initial draft synthesized from the W3Schools "C Decimal Precision" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user