Pointer To Array
An array is a contiguous block of memeory refrenced by its base address variable. The pointer to an array stores the base address which is accessed from the array's name.
/*
http://www.ProbCOMP.com
An array is a contiguous block of memeory refrenced by its base address variable. The pointer to an array
stores the base address which is accessed from the array's name.
*/
#include<stdio.h>
void main()
{
int a[5]={10,20,30,40,50};
int *ptr;
ptr=a;
for(int i=0;i<5;i++)
printf("%d ",ptr[i]);
}
Download Program


