-->

Facebook

Jasper Roberts - Blog

Tuesday, April 28, 2015

Write a program using pointer to read an array if integer

#include<stdio.h>
void main()
{
int a[5]={5,4,6,8,9};
int *p=&a[0];
int i;

clrscr();

for(i=0;i<5;i++)
printf("%d",*(p+i));

for(i=0;i<5;i++)
printf(" %u\n",(p+i));

getch();
}

No comments:

Post a Comment