jdoodle c++
string food = "Pizza"; // Variable declaration
string* ptr = &food; // Pointer declaration
//doubt
// Reference: Output the memory address of food with the pointer (0x6dfed4)
cout << ptr << "\n";
// Dereference: Output the value of food with the pointer (Pizza)
cout << *ptr << "\n";