relationship between an array and


Relationship between an Array and Pointers.

Consider the following.

int arr[] = {0,1,2,3,4,5,6,7,8,9};

If we write arr , it is considered as the address of the first element of an array. As,

 arr is equivalent to &arr[0];

 arr[1] <==>arr+1;

Similarly to access the value we can write ,

  arr[0] or *arr;

  arr[1] or *(arr+1);

 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: relationship between an array and
Reference No:- TGS0309298

Expected delivery within 24 Hours