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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!