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
Conversion between Objects of Different Classes As the compiler does not know anything about the user-defined type, the conversion instructions are to be specified in a functio

What is the role of && operator in a program code? - && is also referred to as AND operator. - When this operator is used, all conditions specified should be TRUE before nex

Write a C++ program that reads from keyboard 3 integers, with proper input prompt, and then displays the maximum sum of any pair of numbers from these three. If the 3 numbers are 5

lcm program.

Multilevel Inheritance In multilevel inheritance there is a parent class , from whom we derive another class . now from this derived class we can derive another class and so on


write a c++ program to accept 3 numbers and find the largest of 3 numbers

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

Write a C++ program which does the following: 1. Asks the user to enter the following text "Four score and seven years ago there was a man named Joey Bagadonuts." 2. Save thi

differentiate between inbuilt and user defined functions