Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Link Between Pointer and Variable | Pointers Fundamentals
C++ Pointers and References
course content

Conteúdo do Curso

C++ Pointers and References

C++ Pointers and References

1. Pointers Fundamentals
2. Pointer Arithmetic
3. References Fundamentals
4. Dynamic Memory Allocation

book
Link Between Pointer and Variable

When you modify the value through the dereferenced pointer, you are essentially modifying the content of the memory location it points to. This directly affects the original variable.

Remember

Changing the value through *(p_variable) is equivalent to changing the value of variable.

Tarefa
test

Swipe to show code editor

  • Declare and initialize the pointer with a variable address.
  • Change the value of dereferenced pointer to zero.
  • Output the variable value.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 3
toggle bottom row

book
Link Between Pointer and Variable

When you modify the value through the dereferenced pointer, you are essentially modifying the content of the memory location it points to. This directly affects the original variable.

Remember

Changing the value through *(p_variable) is equivalent to changing the value of variable.

Tarefa
test

Swipe to show code editor

  • Declare and initialize the pointer with a variable address.
  • Change the value of dereferenced pointer to zero.
  • Output the variable value.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 3
Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
We're sorry to hear that something went wrong. What happened?
some-alt