Showing posts with label pointers. Show all posts
Showing posts with label pointers. Show all posts

Example c Program for ACCESSING ARRAY USING POINTERS

Program By- Jayant Purohit

#include<conio.h>
#include<stdio.h>
void main()
{
int array[5],i,*p;
clrscr();
printf("Please enter Five elements of array now");
for(i=0;i<5;i++)
{
printf("\nenter number:->");
scanf("%d",&array[i]);
}
p=array;
for(i=0;i<5;i++)
{
printf("\nThe elemnt at index number %d is :->%d",i,*p);
p++;
}
getch();
}



Pageviews last month