How to find given string is palindrome or not without using
strreverse() function?
Answers were Sorted based on User's Feedback
Answer / amiricks
Hi Nitin concept is correct but above code is not working fine
as it shows only not a palindrome....
here i have written one simple code any suggestions are most
welcome
val = Inputbox("Enter any string")
L= LEN(val)
for i = L to 1 step -1
v= mid(val,i,1)
va = va&v
Next
if val= va then
msgbox "Name is a Palindrome"
Else
Msgbox "Not a palindrome"
End if
Regards
Amit
umesh.amitkumar@gmail.com
| Is This Answer Correct ? | 15 Yes | 2 No |
Answer / 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 |
what is synchronization point, synchronization method, wait property method? with examples.. plz explain this in brief
How will you set a unique four digit number in an edit field in QTP?
hou can we use vb script in qtp could u tell me breafly
What are the five challenges you faced in QTP?
What are the disadvantages of Recovery Scenarios in QTP ?
how much space occupies in object respository by default?
When we use 'ERR' object to handle the exceptions in the script, do we need to include any statement in the beginning of the script..??
2 Answers DST Global Solutions,
What is the main disadvantage of using low level and Analog modes?
how can i do QTP Certification can any 1 tell me . How 1 approch and who to approch
How to pass parameters to Actions Pls anybody can give the answer.. Thanks in advance...
When we use Object Spy? can we write QTP script before built is came in testing?
how to get the data from a winedit box in vb scripting and store it in a variable if data contains "_"(i.e data is TEST_1)