cstartes
Search stops here
Pages
Home
Blogroll
Guest Post
Privacy Policy
Contact Us
About
Program using pointer to accept an integer & print it in reverse order.
void main()
{
int a[100].n.i;
int *p;clrscr();
printf("Enter the size of array");
scanf("%d",&n)
printf("Enter the element of array");
for(i=0;i
{
scanf("%d",&a[i]);
}
p=a;p=p+(n-1);
for(i=(n-1);i>=0;i--)
{
printf("%d",*p);
p--;
}
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment