Given the variable ip, already declared as a pointer to an integer, write the code to dynamically allocate memory for a single integer value, assign the resulting pointer to ip, and initialize the integer value to 27.
.
.
Click on the title for the solution
.
.
.
Click on the title for the solution
.
.
This is the answer:
.
ip=new int;
*ip=27;
Comments
Post a Comment