You are to compare and contrast the two assignments.

Given the definitions,
```
int *p1, *p2;
p1 = new int;
p2 = new int;
```

a) p1 = p2;
b) *p1 = *p2

a) Makes p1 point to the same place in memory to which p2 points. Orphans memory p1 did point to.
b) Makes data where p1 points the same as the data where p2 points.

Computer Science & Information Technology

You might also like to view...

The Reviewing Pane is a toggle

Indicate whether the statement is true or false

Computer Science & Information Technology

How can you preserve the comments in a Word document when you save

it as a PDF file? What will be an ideal response?

Computer Science & Information Technology