Files
2nd/10_Wiki/Dev/Topic_C/C_Pointer_To_Pointer.md
T
Antigravity Agent 1cfd3bbb56 docs(10_Wiki): 위키 구조 정리 — 언어 튜토리얼 카테고리 폴더 제거 + 신규 자산 동기화
Topic_CSS/Topic_HTML/Topic_JavaScript/Topic_Prompt/Topic_Comfyui 등 기존 카테고리 폴더를 정리하고,
Topic_Graphic/Dev 등 신규 산출물과 Topics 내부 세션/메모리 기록을 동기화.
2026-07-05 00:10:59 +09:00

3.6 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-pointer-to-pointer C Pointer to Pointer Programming_Language draft conceptual
double pointer
int**
C 포인터의 포인터
B 0.86 2026-07-04 2026-07-04
c
programming-language
w3schools
pointers
double-pointer
https://www.w3schools.com/c/c_pointer_to_pointer.php

C Pointer to Pointer

🎯 한 줄 통찰 (One-line insight)

The source's own analogy nails the concept exactly: "a normal pointer is like a note with an address on it; a pointer to pointer is like another note telling you where that first note is kept" — meaning **pptr isn't some special new operation, it's just applying the SAME dereference (*) operator TWICE in a row, following one address to find a second address, then following that to find the actual value. [S1]

🧠 핵심 개념 (Core concepts)

  • Pointer to pointer (double pointer, int **pptr) — a pointer whose stored value is the ADDRESS OF ANOTHER POINTER, not a regular variable. [S1]
  • One extra level of indirection*ptr gives a variable's value directly; **pptr gives the same value by following TWO addresses in sequence (pptr → ptr → myNum). [S1]
  • Mutability through both levels — assigning through **pptr = 20; changes the ORIGINAL variable (myNum), just as *ptr = 20; would. [S1]
  • Use cases — passing pointers into functions (so the function can modify what a pointer points to) and working with complex/nested data structures. [S1]

📖 세부 내용 (Details)

  • Declaring and reading through two levels: int myNum = 10; int *ptr = &myNum; int **pptr = &ptr; printf("**pptr = %d\n", **pptr); // 10. [S1]
  • Modifying the original variable through the double pointer: int myNum = 5; int *ptr = &myNum; int **pptr = &ptr; **pptr = 20; printf("myNum = %d\n", myNum); // 20. [S1]

⚖️ 모순 및 업데이트 (Contradictions & updates)

  • 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources).

🛠️ 적용 사례 (Applied in summary)

현재 발견된 실제 적용 사례가 없습니다 — 함수에 포인터를 전달해 그 포인터 자체를 함수 안에서 바꿔야 할 때, 그리고 복잡한 자료구조를 다룰 때 포인터의 포인터가 유용하다고 원문에 명시됨. [S1]

💻 코드 패턴 (Code patterns)

Modifying the original variable through two levels of pointer indirection (C):

int myNum = 5;
int *ptr = &myNum;
int **pptr = &ptr;
**pptr = 20; // changes myNum
printf("myNum = %d\n", myNum); // prints 20

검증 상태 및 신뢰도

  • 상태: draft
  • 검증 단계: conceptual
  • 출처 신뢰도: B (W3Schools — widely used educational reference, not a primary standards body)
  • 신뢰 점수: 0.86
  • 중복 검사 결과: 신규 생성 (New discovery)

🔗 지식 그래프 (Knowledge Graph)

📚 출처 (Sources)

📝 변경 이력 (Change history)

  • 2026-07-04: Initial draft synthesized from the W3Schools "C Pointer to Pointer" page (Astra wiki-curation, P-Reinforce v3.1 format).