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 |
Suppose i have a script which is having 100 lines.I want to execute that script starting from line no 75.means first qtp should read the script from line no 75 how can u do it.
5 Answers Lehman Brothers, rsystems,
How to find Total no of Text Fields in the Page..Anybody please answer me..Thanks in Advance
How to invoke Mozilla from QTP thru VB Script
how we will use output values in qtp? is there any possibulity by descriptive programming?
i have 100 manual test cases, how to automate from no 1. ols detail steps
I came across Good question ..... Write a script to only download pdf's if there are 20 links on a page. Kindly reply these type of questions are pretty challenging..
When you are running a batch test of 5 scripts and in 2nd script appln crashed, what hpns then?
what could go wrong with test automation?
what is run-time object property in Object spy in QTP9?
Plz explain about MATCH/EXACT MATCH/IGNORE SPAGE in text check points?
In application have 2 list box oppsite list box two edit box is there.so now through using DP how can we select 3 opption in first list box and 2box semect 4 opption.in edit box also we have to write 25 ,28.how can we do this
what is qtp automation frame work,what is the use of that frame work?
64 Answers Cap Gemini, IBM, iGate, TCS,