answersLogoWhite

0

How do you reverse a string with out using strrev?

Updated: 8/19/2019
User Avatar

Wiki User

13y ago

Best Answer

By writing user defined function.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you reverse a string with out using strrev?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you write string in reverse through the HTML tags?

Not possible through html. Use php strrev function. For eg:


How do you reverse a string in PHP?

A predefined function can reverse a string as shown below:echo strrev('pizza'); // outputs: azzip


How do you reverse a string in PHP without using a function?

Without any function is impossible. So I'll assume you mean any coded function, in which case the predefined function below is your answer.$string = strrev($string);


Write c program to print palindrome using string without using strrev strlen strcam?

sdfdg


How To find reverse of string without using strrev function with code?

with a loop. len= strlen (s); p= s; q= s+len-1; while (p<q) { (swap) ++p; --q; }


Reverse of a string without using string handling function?

shashi


Program for palindrome in php?

You could use a function like this:function isPalindrome($string) {$string = strtolower($string);return (strrev($string) == $string) ? true : false;}and then to check a palindrome call an if statement like so:if(isPalindrome($test)) {echo $test.' is a palindrome';}else {echo $test.' is not a palindrome';}


How do you convert a number that consist of alphabet and number in reverse order?

To reverse a number, first convert the number to a string, then reverse the string. Given your number consists of alphanumeric characters, the number must already be a string so simply reverse the string: #include<string> using std::string; string reverse (const string& s) { string str {}; for (auto c : s) str.insert (str.begin(), c); return str; } int main () { std::cout << "Enter a number: "; string s {}; std::cin >> s; std::cout << "The number in reverse is: " << reverse (s); }


Wap in c plus plus to find out the string is palindrome or not in?

use the strrev() function on the given string and compare with original string.If both are equal they are palindromes else not.


String reverse program with single string and without using library functions in java?

You can create a separate string initially empty. Then using a loop, start at the end of the string and add it to the end of the other string. At the end of the loop, the other string would contain the reverse.


Program to find palindrome using C programming?

#include<stdio.h> #include<conio.h> #include<string.h> void main() { char a[15],b[15]; printf("Enter the string\n"); scanf("%s",&a); strcpy(b,a); strrev(a); if(strcmp(a,b)==0) printf("The String is a palindrome"); else printf("The String is not a palindrome"); }


C program for checking a palidrome?

#include<stdio.h> main() { char a[20],b[20]; printf("enter a string"); scanf("%s",&a); strcpy(b,a);//copies string a to b strrev(b);//reverses string b if(strcmp(a,b)==0)//compares if the original and reverse strings are same printf("\n%s is a palindrome",a); else printf("\n%s is not a palindrome",a); return 0; }