C++ Programming Blog

 
 
 

Image

 #include<iostream.h>
 #include<conio.h>

 main()
    {
       clrscr();

       int array[10]={0,1,2,3,4,5,6,7,8,9};

       cout<<\"\\n The contents of the array are : \"<<endl;
       cout<<\"\\n     Elements :\"<<\"\\t\\t  Addresses:\"<<\"\\t\\t     Value:\"<<endl;

       for(int count_1=0;count_1<10;count_1++)
      {
         cout<<\"\\t\"<<\" array [\"<<count_1<<\"]\"<<\"\\t\\t\"<<&array[count_1]<<
                        \"\\t\\t\"<<array[count_1]<<endl;
      }

       getch();
       clrscr();

       cout<<\"\\n The contents of the array in reverse order are : \"<<endl;
       cout<<\"\\n     Elements :\"<<\"\\t\\t  Addresses:\"<<\"\\t\\t     Value:\"<<endl;

       int temp_array[10]={0};

       for(int count_2=9,count_3=0;count_2>=0,count_3<10;count_2--,count_3++)
      temp_array[count_3]=array[count_2];

       for(int count_4=0;count_4<10;count_4++)
      {
         array[count_4]=temp_array[count_4];
         cout<<\"\\t\"<<\" array [\"<<count_4<<\"]\"<<\"\\t\\t\"<<&array[count_4]<<
                        \"\\t\\t\"<<array[count_4]<<endl;
      }

       getch();
       return 0;
    }

    Related Post:
  1. Program to illustrate the implementation of 3D Rotation Transformation along z-axis

  2. Program to show the projection of 3D objects using Standard Perspective Projection w.r.t. an Arbitrary Plane and Center of Projection...

  3. Program to illusrate the use of friend functions

  4. Simple Inventory Program

  5. Program to illustrate the implementation of Reflection Transformation about x-axix, y-axis and w.r.t origin

  6. Program of parser 2

  7. Program to find a Book in the list of Books

  8. Program of Binary Search Tree Operations

  9. Program that reads a numbers , computes and displays the factorial of the given number using recursion

  10. Program to calculate distance summation, subtraction, multiplication and comparison using overloading operators also make it friend functions

  11. Program that provides an example of passing structure as parameter using call by reference

  12. Program to create queue / fifo using dynamic memory allocation

  13. Program to show the implementation of Binary Search Tree as Sets

  14. Program that computes the n_th term of the fibonacci series and also print the series upto the n_th term using recursion

  15. Program of traversing a binary tree in inorder iteratively

  16. Program to illustrate pointers , structure and passing structure pointers to function.

  17. Program to illustrate the implementation of Scaling Transformation along Arbitrary Direction

  18. Program to illustrate the Insertion Sort

  19. Program to show the projection of 3D objects using Orthographics Parallel Projection w.r.t. xy-plane and along vector v

  20. Program of tower of hanoi

 
 
Didn't find what you were looking for? Find more on Program to reverse the content of an integer array