For Business
Login
Home
Assessments
Mytat Certificates
Community
Courses
Premium Courses
jobs
Practice
Upskilling
Projects
Help
Run >>
PHP
Visual Basic.Net
SQL (SQLite 3.27.2)
Scala
Rust
Ruby
R
Python for ML
Python (3.8.1)
Python (2.7.17)
Perl (5.28.1)
C (GCC 9.2.0)
C#
C++ (GCC 9.2.0)
Go
Groovy (3.0.3)
Java
JavaScript / Node.js
Kotlin
Lua
Objective-C
#include
#include
using namespace std; int main() { string food = "Pizza"; string* ptr = &food; // Output the value of food cout << food << "\n"; // Output the memory address of food cout << &food << "\n"; // Access the memory address of food and output its value cout << *ptr << "\n"; // Change the value of the pointer *ptr = "Hamburger"; // Output the new value of the pointer cout << *ptr << "\n"; // Output the new value of the food variable cout << food << "\n"; return 0; }