For Business
Login
Home
Assessments
Mytat Certificates
Community
Courses
Premium Courses
jobs
Practice
Upskilling
Projects
Help
Run ยป
#include
#include
using namespace std; int main() { string food = "Pizza"; // Variable declaration string* ptr = &food; // Pointer declaration // Reference: Output the memory address of food with the pointer cout << ptr << "\n"; // Dereference: Output the value of food with the pointer cout << *ptr << "\n"; return 0; }