9a135bd19d
최상위 10_Wiki/Topic_*였던 4개 카테고리 폴더를 10_Wiki/Topics/Topic_* 로 재배치. 콘텐츠 변경 없음(순수 폴더 이동) — Topics/ 하위 나머지 폴더는 이미 지난 커밋에서 전부 정리된 상태(잔존 항목은 에이전트 운영 상태 및 사용자가 보존을 요청한 업데이트0615/무제 3.canvas 뿐).
3.9 KiB
3.9 KiB
id, title, category, status, verification_status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, created_at, updated_at, review_reason, merge_history, tags, raw_sources, applied_in, github_commit
| id | title | category | status | verification_status | canonical_id | aliases | duplicate_of | source_trust_level | confidence_score | created_at | updated_at | review_reason | merge_history | tags | raw_sources | applied_in | github_commit | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| c-newline | C New Lines | Programming_Language | draft | conceptual |
|
B | 0.83 | 2026-07-04 | 2026-07-04 |
|
|
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
\nin a row = blank line(s) — since each\nmoves 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\ncharacters 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):
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).