The variable ip_arr has been declared as an array of 20 pointers to integer (i.e., each element of ip_arr is a pointer to an integer). Allocate 20 integer values and assign their pointers to the elements of ip_arr.
.
.
Click on the title for the solution
.
.
for(int i = 0; i < 20; i++)
{
ip_arr[i] = new int;
}
.
Click on the title for the solution
.
.
This is the answer:
.
{
ip_arr[i] = new int;
}
Comments
Post a Comment