docs(10_Wiki): Topic_Business/General/Graphic/Programming을 Topics/ 하위로 이동
최상위 10_Wiki/Topic_*였던 4개 카테고리 폴더를 10_Wiki/Topics/Topic_* 로 재배치. 콘텐츠 변경 없음(순수 폴더 이동) — Topics/ 하위 나머지 폴더는 이미 지난 커밋에서 전부 정리된 상태(잔존 항목은 에이전트 운영 상태 및 사용자가 보존을 요청한 업데이트0615/무제 3.canvas 뿐).
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
---
|
||||
id: c-newline
|
||||
title: "C New Lines"
|
||||
category: "Programming_Language"
|
||||
status: "draft"
|
||||
verification_status: "conceptual"
|
||||
canonical_id: ""
|
||||
aliases: ["\\n escape sequence", "blank line", "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", "newline", "escape-sequences"]
|
||||
raw_sources: ["https://www.w3schools.com/c/c_newline.php"]
|
||||
applied_in: []
|
||||
github_commit: ""
|
||||
---
|
||||
|
||||
# [[C New Lines]]
|
||||
|
||||
## 🎯 한 줄 통찰 (One-line insight)
|
||||
`\n` isn't a "print a new line" command — it's an ESCAPE SEQUENCE representing a special character (moving the cursor to the start of the next line), placing it in the same category as `\t`, `\\`, and `\"` from earlier chapters, meaning "printing on multiple lines" in C is really just "printing one string that happens to contain a cursor-movement character," which is why doubling it up (`\n\n`) produces a blank line — the SAME character, repeated, moves the cursor down twice. [S1]
|
||||
|
||||
## 🧠 핵심 개념 (Core concepts)
|
||||
- **`\n`** — an escape sequence that moves the cursor to the beginning of the next line. [S1]
|
||||
- **Escape sequence** — a backslash-prefixed representation of a special character that can't be typed directly (this chapter's specific instance of the general pattern from the earlier Special Characters chapter). [S1]
|
||||
- **Multiple `\n` in a row = blank line(s)** — since each `\n` moves the cursor down one line, two in a row (`\n\n`) skips an entire visual line. [S1]
|
||||
- **Single printf(), multiple lines** — one `printf()` call CAN contain several `\n` characters to produce multi-line output, though the source notes this can hurt readability if overused. [S1]
|
||||
|
||||
## 📖 세부 내용 (Details)
|
||||
- Newline between two separate printf calls: `printf("Hello World!\n"); printf("I am learning C.");`. [S1]
|
||||
- Multiple lines from one printf call: `printf("Hello World!\nI am learning C.\nAnd it is awesome!");`. [S1]
|
||||
- Producing a blank line with doubled `\n`: `printf("Hello World!\n\n"); printf("I am learning C.");`. [S1]
|
||||
- Other common escape sequences reiterated: `\t` (horizontal tab), `\\` (literal backslash), `\"` (literal double quote). [S1]
|
||||
|
||||
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||
- **\n\n이 빈 줄을 만드는 이유**: \n 하나가 커서를 다음 줄로 한 번 이동시키므로, 두 번 연속 쓰면 한 줄을 건너뛰어 빈 줄처럼 보이게 된다는 점이 확인됨 — 특별한 "빈 줄" 문법이 있는 것이 아니라 동일한 이스케이프 문자의 반복일 뿐. [S1]
|
||||
|
||||
## 🛠️ 적용 사례 (Applied in summary)
|
||||
현재 발견된 실제 적용 사례가 없습니다 — 여러 문장을 하나의 printf() 호출에 \n으로 이어붙이는 것이 코드를 짧게 만들지만 가독성을 해칠 수 있다는 점이 트레이드오프로 언급됨. [S1]
|
||||
|
||||
## 💻 코드 패턴 (Code patterns)
|
||||
Producing a blank line by repeating the newline escape sequence (C):
|
||||
```c
|
||||
printf("Hello World!\n\n");
|
||||
printf("I am learning C.");
|
||||
```
|
||||
|
||||
## ✅ 검증 상태 및 신뢰도
|
||||
- **상태:** draft
|
||||
- **검증 단계:** conceptual
|
||||
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||
- **신뢰 점수:** 0.83
|
||||
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||
|
||||
## 🔗 지식 그래프 (Knowledge Graph)
|
||||
- **상위/루트:** [[C Tutorial]]
|
||||
- **관련 개념:** [[C Null]], [[C Strings Esc]], [[C Output]]
|
||||
- **참조 맥락:** C 튜토리얼 전체의 마지막 챕터 — 출력(Output)과 특수문자(Strings Esc) 챕터의 개념을 마무리로 재확인.
|
||||
|
||||
## 📚 출처 (Sources)
|
||||
- [S1] W3Schools — C New Lines — https://www.w3schools.com/c/c_newline.php
|
||||
|
||||
## 📝 변경 이력 (Change history)
|
||||
- 2026-07-04: Initial draft synthesized from the W3Schools "C New Lines" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||
Reference in New Issue
Block a user