Program is to reverse the names stored in an array pointer, C/C++ Programming

Program is to reverse the names stored in an array pointer:

Program is to reverse the 6 names stored in an array pointer as name[]

void main()

  {

 clrscr();

 char *names[]={ "Anand","Vimal","Naresh","Amul","Sohan","Vishal" };

 char *t;

 int l=strlen(*names);

 for (int i=0;i<(l+1)/2;i++)

     {

      t=names[i];

      names[i]=names[l-i];

      names[l-i]=t;

      }

for (i=0;i<=l;i++)

    {

     cout<

    }

    getch();

  }

Posted Date: 10/19/2012 7:55:41 AM | Location : United States







Related Discussions:- Program is to reverse the names stored in an array pointer, Assignment Help, Ask Question on Program is to reverse the names stored in an array pointer, Get Answer, Expert's Help, Program is to reverse the names stored in an array pointer Discussions

Write discussion on Program is to reverse the names stored in an array pointer
Your posts are moderated
Related Questions
Write a program that reads data into an array of type int. You must use an array. The numbers input are attendance numbers at a conference. Keep a running average, number of events

write a program to find the area under the curve y=f(x) between x=a and x=b integrate y=f(x)   #include float start_point, /* GLOBAL VARIABLES */

The project is to design and write a C++11/FLTKgame program with a graphical user interface.The game is based on "pancake sorting," as described at http://en.wikipedia.org/wiki/P

Ask queByteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colo


write a C++ program that performs the following tasks 1. prompts the user to enter two numbers 2. displays the divisors of each number and store the divisors of number 1 in A and t

The for Loop For loop is the controlled form of loop. The general format of this : for( initialize ; test ; update)                  {                     statements;

(a) Define a procedure (deep-member x e) that takes a list x and an element e and returns #t if the element e is in the list or in any lists that the list x contains. e.g., (dee

Car Rental System This system tracks cars in a rental company. Each car has a number (assume its plate number), type (small car, four wheel car), and status (rented, available). T

Differentiate between functions getch () and getche (). - Both functions accept a character input value from user. - When getch () is used, key that was pressed won't appear