dev c
CtrlK
  • Introduction
  • Variable
  • Data Type
    • Data model
    • Data Alignment
      • stdint.h
  • Escape Sequence
  • First Chapter
  • How to C in 2016
  • Head Files
  • Struct
  • Compiler
    • GCC
    • Clang
  • Design Pattern
  • Pointer
    • Pointer 運算
    • With Array
    • New and Delete
    • Memory Allocation
    • Pointer to Pointer
    • char pointer
    • function pointer
  • STDIO
  • Variable-length argument
  • Struct
    • Struct and Pointer
    • Union
  • Advanced
    • pragma
  • C Library
    • assert.h
    • string.h
  • swap function
  • Function
    • Basics
    • Use function as args
  • Operator
    • Increment, Assignment, Decrement
  • Operators
  • Associative Array
  • 題庫
  • Array
    • Strings
Powered by GitBook
On this page

Was this helpful?

  1. Pointer

Pointer to Pointer

#Ptr to Ptr

就還是指標, 所以就是用來儲存指標(儲存某變數的記憶體 addr)的 addr

int **ptr = &ptr; // 只是宣告

printf("**ptr = %d\n, **ptr);

printf("**ptr = %p\n, *ptr);

printf("**ptr = %p\n, ptr);

*ptr: 指進去一層

**ptr : 指進去再指進去

PreviousMemory AllocationNextchar pointer

Last updated 4 years ago

Was this helpful?