How to find given string is palindrome or not without using
strreverse() function?

Answer Posted / nitin jagjivan

Strng = "NITIN"
temp = "Pass"
dim arr()

Strng_Length = len(Strng)
redim arr(Strng_Length)

For i=1 to Strng_Length
arr(i-1)= mid(Strng,i,1)
Next

For i=1 to round(Strng_Length/2)
If instr(ucase(arr(i-1)),arr(Strng_Length-
i)) = 0 then
temp = "Fail"
End If
Next

If temp <> "Fail" then
msgbox "Given input is a palindrome"
Else
msgbox "Try another String, Not Pali"
End If

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I want to grow as a Automation Engineer,Kindly help me in clearing my interview that what interviewer looks for as a Automation Engineer. I am having three years of experience in testing.

1796


Hi, I am using OutputCheckPoint for 2 webelements Bed:4 and Bath:2 Full,1 partial in my result page and I am storing the value in the data table. I dont need the string Bed:4,I would like to get only the no 4. How can I get it? Even though I highlight only 4,It is seleting the full value "bed 4". Same thing happend for second webelement Bath:2 Full,1 partial I need only the No 2. I used the following to split MyArray = Split(UIBathResult, " ", -1, 1) But it is giving the value My Array(0)=Bath:2full,1Partial I need the only the nos for further comparision.Any help? Thanks Uma

3584


can u explain the keyword driven framework with an example clearly how to create all the files and how to attach to main test.

5491


what is impact analysis on regression testing?

2222


terminal services client

1977


in my application,validation message has in japanise language.how to validate this message is appears properly or not

1738


What is the difference between keyword view and expert view?

817


How qtp recognizes the object?

849


How qtp identifies objects?

739


What test cases can you automate using QTP?

828


Which recording modes need more memory?

777


What is the use of running the scripts in Hidden-mode in UFT?

902


Client is able to provide budget..he want you to choose the automation tool for the web application? which one you will select ? QTP or Selenium ? what are the reasons?

1460


Is it possible to change the values of analog recording?

788


What is the difference between a Function and Action in QTP?

824