Question: C++ function Consider the following C++ function: int *create_node (int n) {int *p1 = new int (n); int *p2 = new int (n); int *p3
C++ function

Consider the following C++ function: int *create_node (int n) {int *p1 = new int (n); int *p2 = new int (n); int *p3 = p2; int *p4 = p1; q = p1;//q is an external variable return p3;} When create_node returns, how many of the anonymous variables that it creates will be garbage
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
