Tuesday, 5 March 2013

Program to print Reverse of Array


By on 02:38

Reversing of Array in c programming:


Q)Write a program to create array and print the array in reverse format.

Note:-You can also create this program in c++(c plus plus),java,c#(c sharp) languages with the same logic.


P:#include<stdio.h>
Void main()
{
int i,lim,a[50];
printf("enter limit");
scanf("%d",&l);
printf("Enter Array");
for(i=0;i<lim;i++)
scanf("%d",&a[i]);
for(i=lim-1;i>=0;i--)
printf("%d",a[i]);
getch();
}

If you have any query then leave your comments and don't forgot to follow me on Google+,Facebook,Twitter.

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...