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 ofvariable
.
Swipe to start coding
- Declare and initialize the pointer with a
variable
address. - Change the value of dereferenced pointer to zero.
- Output the
variable
value.
Solución
solution.cpp
¡Gracias por tus comentarios!
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Awesome!
Completion rate improved to 5.88
Link Between Pointer and Variable
Desliza para mostrar el menú
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 ofvariable
.
Swipe to start coding
- Declare and initialize the pointer with a
variable
address. - Change the value of dereferenced pointer to zero.
- Output the
variable
value.
Solución
solution.cpp
¡Gracias por tus comentarios!
Awesome!
Completion rate improved to 5.88single