Advertisement
Guest User

Untitled

a guest
Dec 9th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.47 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #define SIZE 16
  4.  
  5. void getValue(int* my_pointer) {   // * показываем что это указатель (не просто параметр)
  6.     *my_pointer = 1000;
  7. }
  8.  
  9.  
  10. int main()
  11. {
  12.     int get_value;
  13.     getValue(&get_value);      // передаем адрес перменной с помощью &  
  14.     printf("Value of variable is %d\n", get_value); //типо достучались до параметра get_value
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement