Question: Create 4-element built-in array. Set a pointer to point nPtr to the built-in array. Output built-in array using array subscript notation. Output built-in array using

Create 4-element built-in array. Set a pointer to point nPtr to the built-in array. Output built-in array using array subscript notation. Output built-in array using array name and pointer/offset notation. Output built-in array using nPtr and array subscript notation.

Output built-in array using nPtr and pointer/offset notation.

Sample run:

Array numbers displayed with:

Array subscript notation numbers[0] = 100

numbers[1] = 200

numbers[2] = 300

numbers[3] = 400

Pointer/offset notation where the pointer is the array name *(numbers + 0) = 100 *(numbers + 1) = 200 *(numbers + 2) = 300 *(numbers + 3) = 400 
Pointer subscript notation nPtr[0] = 100 nPtr[1] = 200 nPtr[2] = 300 nPtr[3] = 400 
Pointer/offset notation *(nPtr + 0) = 100 *(nPtr + 1) = 200 *(nPtr + 2) = 300 *(nPtr + 3) = 400 

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!