Blog Moved

This website completely moved to new domain. For latest content, visit www.programmingposts.com

Search This Blog

6 May 2013

C PROGRAM TO PRINT THE ELEMENTS OF ARRAY IN REVERSE ORDER

C PROGRAM TO PRINT THE ELEMENTS OF ARRAY IN REVERSE ORDER

#include<stdio.h>
#define MAX 25 //maximum size of array is 25

main()
{
  int i,n,arr[MAX];

  printf(" *** C PROGRAMS BLOG ***");
  printf("\n >>> Program to Print the element of array in Reverse Order<<<");
  printf("\n\n Enter the size of array: ");
  scanf("%d",&n); //taking size of array as input from user
  printf("\n Enter the %d elements of array: \n",n);
  
  //taking input all the elements of array using for loop
  for(i=0;i<n;i++)
  {
   printf("\n arr[%d]:",i+1);
   scanf("%d",&arr[i]);    
  }
   printf("\n The Elements of Array in Reverse order are : \n");
   
    //Printing the elements of array in reverse order
   for(i=n-1;i>=0;i--)
   {
    printf(" %d ",arr[i]);   
   }
   getch();
}

Sample Output :



12 comments:

  1. Hi, Nice C program to print the elements of array in reverse order.Thanks, its really helped me......

    -Aparna
    Theosoft

    ReplyDelete
  2. Thanks for your ideas. You can also find the details on Affity Solutions, at the C Developers. The main object of the Affity Solutions is to provide quality web services and is among the few software development company in Nagpur.

    ReplyDelete
  3. Find the all solutions and tutorials of "c programming" follow this link http://www.cprogramming-bd.com/c_page.aspx

    ReplyDelete
  4. Good
    Here is a link for C/C++ programs and pointer programs. This may be useful for you.

    C/C++ Programs

    ReplyDelete
  5. thanks for creating a nice post on c programming but did you know what is conditional statement in c programming

    ReplyDelete
  6. hi welcome to this blog.its really informative blog.thank you for sharing this blog.
    c programming training

    ReplyDelete
  7. Thanks for sharing your experience. Very helpful for learners. c programming classes in pune

    ReplyDelete
  8. It is told that c programming is the mother of all languages. c programming is used in most of the important sectors. All the operators are made by c programming . So, it is very important to learn c programming .
    In my website c programming is taught in very easy way. You will get videos too in my website ltslearn.com.

    ReplyDelete
  9. It is told that c programming is the mother of all languages. c programming is used in most of the important sectors. All the operators are made by c programming . So, it is very important to learn c programming .
    In my website c programming is taught in very easy way. You will get videos too in my website ltslearn.com.

    ReplyDelete
  10. Thanks for this post, I really appriciate. I have read posts, all are in working condition. and I really like your writing style. Keep it up like.
    Buy Car Battery Online

    ReplyDelete
  11. Thanks for splitting your comprehension with us. It’s really useful to me & I hope it helps the people who in need of this vital informationC Programming Training in Chennai

    ReplyDelete