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 |
Will QTP Support Visual Foxpro Applications? If yes please tell me whether I need to install any additional addins for that?
How can I open a EXCEL file from QTP Resultviewer with reporter.ReportEvent function call. Example: Test files for details click "here". And clicking "Here" in the resultviewer will open a local EXCEL FILE.
How to handle Dynamic Arrays?
what are the different Frame Works in Quick Test Proffessional testing
how can i call reusable action in a function could any one explain me?
how do we know whether all objects are stored in the object repository or not? how can we know if a particular object is not stored in the repository?
i ve an excel in a QC folder. Thru my QTP script i want to open that excel in runtime. I am running this script from QC itself
Can we call a parameter from an action to other action?
How to test the login page in different ways in automation testing and i need code?
Is it possible for QTP to capture the objects in word document.If so please give me the code.Thank you.
VB scrip has a special command named LBound, which returns the starting index of an arry. What are the possible indexes an array can start with? options are given below. and one only the correct answer. pl select it 1. any index 2. only even non-negative 3. only 0 4. any non-negative integer
Is it possible to split an action? How?