Printing Addresses and Accessing Elements of an Array

Explore different methods of printing addresses and accessing elements of an array.

Printing the address of array elements

There are two ways to print the address of array elements:

  • Using the ampersand operator
  • Using simple arithmetic

Using the ampersand operator

We can print the addresses of array elements using the expressions: &a[ 0 ], &a[ 1 ], &a[ 2 ], etc.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy