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
i need a program for finding the last fibonacci number

Aim: To implement a program for bank account using static data type. Code: class bank {             static int acc_no;             int acc;             float b

Write a function that calculates the number of elapsed days between two dates. For example the days between Feb 3, 1970 and June 21, 1980? Becareful for the Leap year.

What is the difference among const char *myPointer and char *const myPointer?  A: Const char *myPointer is a non constant pointer to constant data; whereas char *const myPointer

Bubble sort C program: Write a program to define a bubble sort. void main()  {   clrscr();   int a[100],ch,n;   cout   cin>>n;   for (int i=0;i

In the Byteland country a string "s" is said to super ascii string if and only if count of each charecter in the string is equal to its ascci value in the byteland country ascii co

padovan string problem program 1 : package test.padovanstring; public class PadovanString {     public int stringOccurrences(int n, String str){        if(n >= 40)

This problem familiarizes you with using random numbers in C++. The program is to compute a good approximation of π using a simulation method called "Monte Carlo". The following fi

Implement multiple stacks in a single dimensional array. Write algorithms for various stack operations for them.

differentiate between inbuilt and user defined functions