Given that p1 and p2 point to elements in the same array, what does the following code do? Are there values of p1 or p2 that make this code illegal
belongs to book: C++ Primer|Stanley B.Lippman, Josee Lajoie, Barbara E.Moo|5th Edition| Chapter number:3| Question number:3.34
All Answers
total answers (1)
The code move `
need an explanation for this answer? contact us directly to get an explanation for this answerp1
` to `p2
`, it is the same with `p1 = p2
`.Any values are legal as long as both `
p1
` and `p2
` point to elements in the same array.