Question: What would happen if the following code were compile and run? int *p: while(true) { p = new int: } It will fill up the

 What would happen if the following code were compile and run?

What would happen if the following code were compile and run? int *p: while(true) { p = new int: } It will fill up the heap, eventually causing the OS to run out of virtual memory. It would give us the same space in memory, and do this forever. It would deallocate the old space when it recreates new space, and do this forever. It will constantly assign p the value 0. It wouldn't compile

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!