Answers for "jdoodle c++"

C++
0

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";
Posted by: Guest on October-19-2021

Browse Popular Code Answers by Language