Pointers and Arrays Revisited
In this class, we will try to understand Pointers and Arrays Revisited.
The basic understanding of Pointers and Arrays has already been made in our previous classes.
Pointers and Arrays
Now we will have a complete and deeper understanding of the Pointers and Arrays.
The names of the arrays and pointers are used interchangeably in C.
To understand this concept, we will consider the programming lines as shown below.
An array of elements will get created in the above program, and a pointer variable p will be pointing to the first element of an array.
The visualization of the above program is shown below.
To access the elements of the array and the address of the array’s elements, we have different types of possibilities.
The elements and the address of the ‘elements’ can be accessed by the array name of the pointer variable name.
The image below shows all the possibilities.