Thursday, 30 May 2013

C Program to Reverse N Integer Number Stored In an Array

By

 C Program to Reverse N Integer Number Stored in an Array


#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int array[100];
int *p,n,i;
printf("***********************************");
printf("\nwww.flintgroups.com\n");
printf("***********************************\n");
printf("Enter Number of Interger to Store\n");
scanf("%d",&n);
printf("Enter the Integers\n");
for (i=0;i<n;i++)
{
scanf("%d",&array[i]);
p=&array[n-1];
}
printf("The Reversed Integer Array Is\n");
for(i=0;i<n;i++)
{
printf("%d\n",*p);
p--;
}
getch();

}

Sample Output :

if you want this program in a PDF Format 

https://docs.google.com/file/d/0BzxvPSQgnviFWm5wc0xIVVZ5RGc/edit?usp=sharing

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

Labels