Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using C++ Create an Array project to include: 1. Define a pointer to a double, pdArray . 2. Assign the pointer, pdArray , to contain

Using C++ Create an Array project to include: 1. Define a pointer to a double, pdArray. 2. Assign the pointer, pdArray, to contain the address of the double array, dArr: 3. Use the array name, dArr, to print out the array elements with subscript notation, [ ]. All on 1 line a space between each. 4. Use the pointer to print out the array elements with pointer notation while not changing the pointer itself. Use a for loop. *( pdArray + Cnt1) would be an example. All on 1 line a space between each. 5. Use the pointer to print out the array elements with pointer notation but change the pointer to point to the actual array element rather than the method in 18. All on 1 line. *pdArray would do this if the loop has the following post loop operation: pdArray++ 6. Use the array name for the double array and pointer notation to print the entire array, all on one line. 7. Using a different pointer, piArray, allocate enough memory for 100 int's and assign the address to the pointer. 8. In a for loop assign every item in the array to be a random number from 1 to 49 ( hint: rand() % 6 + 1 gives random numbers from 1 to 6 ) 9. Using cout print the first 10 items in the array, all on 1 line.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions

Question

=+Trainers from headquarters? Local trainers? Independent trainers?

Answered: 1 week ago