sofiiiaaapiust

Untitled

Mar 20th, 2023
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. int value = 5;
  6. int* ptr = &value;
  7.  
  8. std::cout << "The value of value: " << value << std::endl;
  9. std::cout << "The address of variable value: " << &value << std::endl;
  10. std::cout << "The value pointed to by pointer ptr: " << *ptr << std::endl;
  11. std::cout << "The address pointed to by pointer ptr: " << ptr << std::endl;
  12.  
  13. return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment