#include<stdio.h>
#include<conio.h>
#include<iostream.h>
main()
{
char str[50];
int i;
clrscr();
cout<<"\n"<<"Enter a String: ";
cin.getline(str,50);
cout<<"\n"<<str<<"\n";
for(i=0;str[i]!='\0';i++);
cout<<"\nLength of String :"<<i;
for(;i!=-1;i--)
{
cout<<str[i];
}
getch();
}
Tuesday, 15 April 2014
reverse of a string without using string functions
15:17
No comments
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment