Question: using c++ 1. Allocate an array of 100 integer pointers and assign the resulting pointer to the appropriately declared variable , ip_arr. Allocate 100 integers

using c++

1. Allocate an array of 100 integer pointers and assign the resulting pointer to the appropriately declared variable , ip_arr. Allocate 100 integers and assign the resulting pointers to the elements of ip_arr. Initialize each integer value to -1.

2. The variables arr1 and arr2 have been declared as pointers to integers . An array of 10 elements has been allocated, its pointer assigned to arr1, and the elements initialized to some values . Allocate an array of 20 elements , assign its pointer to arr2, copy the 10 elements from arr1 to the first 10 elements of arr2, and initialize the remainder of the elements of arr2 to 0.

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!