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();
}



1 comment:

  1. really working and beneficial for me.
    thanks for providing such working codes.

    ReplyDelete

Please write your Views about this Post here:->;

Pageviews last month