#include <iostream.h>
#include <conio.h>
void reverse (char *s)
{
char *k = s, temp;
while(*k !=NULL)
k++;
while(k>s)
{
k--;
temp = *k;
*k = *s;
*s = temp;
s++;
}
}
void main(void)
{
char string[] = "Hello, How Are You";
reverse(string);
cout<<string<<endl;
getch();
}
|