--- 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).