#include <stdio.h>
int main ()
{
int Array [ ] = {10, 20, 40, 50,60} ;
int i;
int* pArray = Array; // defining the pointer to array Array
clrscr();
for (i=0 ; i<5;i++) //loop for output of array elements
printf("Array[%d]= %d,\t *(pArray+%d) = %d\n",i,Array[i],i,*(pArray+i) ); // *(pArray +i)is the value of Array[i]element of array.
return 0;
}
The output is as given below. The explanation is already given above
Dinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.
Related Articles
Basic Courses
Advance Courses