Skip to content · ⁨본문 바로가기⁩

A problem from last lesson

  • Last lesson, a function got a copy of your number. Changing the copy did not change the original.
  • C copies every argument you pass to a function. So a normal function cannot change your variable.
  • To change it, the function needs the variable's address — where it lives in memory.

x holds 5 at address 0x100; pointer p holds 0x100, so *p reaches 5

Handout · ⁨교재 자료⁩

Log in or create account · ⁨로그인 또는 계정 만들기⁩

IGCSE, A-Level & AP