Define the term Base Address of an Array.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 15RQ
icon
Related questions
Question

Define the term Base Address of an Array.

Expert Solution
Step 1

The address of memory where the first element of an array is located can be considered as base address of an array.

Step 2

Suppose that an array with the following value initialized in it used.

char array [] = ”Programming” ;

There are four ways to point the base address of an array.

array[0];

0[array];

*(array+0);

*(0+array);

The above four expression points the same which is ‘P’.

steps

Step by step

Solved in 4 steps with 1 images

Blurred answer