Monday, 29 October 2012

Program Of Reverse String In C++

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
 
main()
 
{
 
clrscr();
 
char x[20];
 
int l;
 
//cout<<"Enter String=";
 
//cin>>x;
 
gets(x);
 
reverse(x);
 
getch();
 
}
 
{
 
int p=0,i;
 
for(i=0;a[i]!='\0';i++)
 
{
 
p++;
 
}
 
{
 
cout<<a[i];
 
}
 
}

1 comment:

  1. C++ Program to Reverse a Strings

    Reverse a String means reverse the position of all character of String. You can use swapping concept to reverse any string in c++.

    ReplyDelete