Hay buddy this is homework. U have to solve it by urself.
Yes.
Not possible through html. Use php strrev function. For eg:
This is not a question.
string rose = "rose"; rose = rose.Replace('r', 'R');
print c co com comp compu
If you don't need to preserve the first string you could just iterate over the second string and copy each character onto the end of the first string, then return that
Use text-editor notepad++
#include <iostream> #include <string> std::string* concat_print_strings(std::string* pStr1, std::string* pStr2 ) { std::string * strResult = new std::string( *pStr1 ); strResult->append( *pStr2 ); std::cout << strResult->c_str() << std::endl; return( strResult ); } int main() { std::string str1 = "This is a string."; std::string str2 = " And this is another string."; std::string* pStr = concat_print_strings( &str1, &str2 ); delete( pStr ); pStr = NULL; return( 0 ); }
int mystrlen (const char *s) { const char *t; if (!s) return 0; for (t=s-1;*++t;); return t-s; }
def isPalindrome(s): return s == s[::-1] then just call the function with a string like isPalindrome('poop')
Use the tolower() function. Example: char* a = 'X'; a = tolower(a); printf("%c", a);
You can write 2X, where X is the length of the string.