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
Structures A structure is a derived data type. It is a combination of logically related data items. Unlike arrays, which are a collection of such as data types, structures can

I have an assignment , can I send it

Define Functions with arguments and no return values The calling function will read a data from the terminal and pass it on to called as function and this will work good as the

superposition of waves

Explain redirection in c++

dispaly the last ant on rod

Four cells, each with an internal resistance of 0.40 ? and an e.m.f. of 2.5 V are connected in series to a load of 38.40 ?. (a) Verify the current flowing in the circuit and t

a program to find the area under curve y=f(x) between x=a and x=b,integrate y=f(x) between the limits of a and b.

Pointer to function: int mul(int a, int b, int c) {   return a*b*c; } void main() {   int (*function_pointer)(int, int, int);   function_pointer = &mul;

write c program to do the following : -fill 2 dimensional array (square matrix array with size=4). -ask the user to enter any integer number and add this number to the diagonals -o