e9cbf23ab5
이전 재구성 작업에서 Dev/ 폴더가 누락되었던 것을 반영. - Dev/Topic_Programming(중첩 폴더, 78개)은 Dev 자체 최상위 폴더들 (Architecture/Conventions/Engineering_Intelligence 등)과 완전 중복이라 제거. - Dev 최상위 엔지니어링 지식 폴더(Architecture/Conventions/Engineering_Intelligence/ Failure_Library/Generalized_Principles/Language/Pattern_Catalog/Platform_Guides/ Subsystems, 77개)는 이미 Topic_Programming/Topic_Programming에 더 최신 버전이 존재해 중복 제거(고유 콘텐츠 1개는 예외 처리하여 이동 보존). - Dev의 W3Schools 언어 튜토리얼 폴더(Topic_C/CPP/CSS/CSharp/HOWTO/HTML/Java/ JavaScript/PHP/Python/SQL/W3CSS, 1201개)는 전부 Topic_Programming 하위로 이동. - 에이전트 운영 상태(.astra/docs)는 그대로 유지, 콘텐츠 폴더만 정리. - Topic_Programming 최종 문서 수: 2784 → 3985.
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).