Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main()
- {
- int value = 5;
- int* ptr = &value;
- std::cout << "The value of value: " << value << std::endl;
- std::cout << "The address of variable value: " << &value << std::endl;
- std::cout << "The value pointed to by pointer ptr: " << *ptr << std::endl;
- std::cout << "The address pointed to by pointer ptr: " << ptr << std::endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment