Search⌘ K
AI Features

Printing Addresses and Accessing Elements of an Array

Explore techniques to print the memory addresses of array elements using the ampersand operator and pointer arithmetic. Understand how to access array elements with both subscript and pointer notation, enabling accurate manipulation of arrays in C programming.

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 ...