Question: When the following code executes, what is the output ? (HINT: Draw a picture!) string s1 = Ruthie; string s2 = Skye; string* my_ptr =
When the following code executes, what is the output? (HINT: Draw a picture!)
string s1 = "Ruthie"; string s2 = "Skye"; string* my_ptr = &s1; string* other_ptr = &s2; *other_ptr = *my_ptr; *other_ptr = "Ziggy"; cout
When the following code executes, what is the output? (HINT: Draw a picture!) string s1 = "Ruthie"; string s2 = "Skye"; string*my_ptr =&s1; string* other_ptr =&s2; *other_ptr = *my_ptr; *other_ptr = "Ziggy"; cout *my_ptr; Select one: Skye ziggy Ruthie Cleo no output (empty string)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
