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

Зміст курсу

C++ Pointers and References

C++ Pointers and References

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

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.

Завдання

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

Завдання

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

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 1. Розділ 3
toggle bottom row

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.

Завдання

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

Завдання

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

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 1. Розділ 3
toggle bottom row

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.

Завдання

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

Завдання

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

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

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.

Завдання

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

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 1. Розділ 3
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt