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
draw the flow chart to print the fibonacci series upto n th terms

Develop a program to meet the following requirements: 1. Must use at least one function in addition to main (you can use more) 2. Must use selection 3. Must use deference/indire

A: A reference has to always refer to some object and, so, must always be initialized; pointers do not have such limits. A pointer may be reassigned to point to distinct objects wh

program coding for the conversion of string to a palindrome

C program to reverse the elements of array: #define rows 3 #define cols 3 void main() {                 int i=0,j=0;                 int arr[rows][cols];

obtain two numbers from thekey board,and determain and display(if either)is the larger of two numbers.

d county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Necklaces


A virtual function permits derived classes to replace the implementation given by the base class. The compiler makes sure the replacement is always known as whenever the object in

derivations 1. Regardless of the type of derivation, private members are inherited by the derived class, but cannot be accessed by the new member function of the derived class,