Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

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

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

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

Post New Answer

More QTP Interview Questions

what is synchronization point, synchronization method, wait property method? with examples.. plz explain this in brief

3 Answers  


How will you set a unique four digit number in an edit field in QTP?

2 Answers   IBM,


hou can we use vb script in qtp could u tell me breafly

0 Answers  


What are the five challenges you faced in QTP?

0 Answers   CTS,


What are the disadvantages of Recovery Scenarios in QTP ?

3 Answers  


how much space occupies in object respository by default?

5 Answers   VSoft,


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?

2 Answers  


how can i do QTP Certification can any 1 tell me . How 1 approch and who to approch

7 Answers   ADP, Hydus,


How to pass parameters to Actions Pls anybody can give the answer.. Thanks in advance...

2 Answers   Navis,


When we use Object Spy? can we write QTP script before built is came in testing?

3 Answers   Impulse,


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)

3 Answers  


Categories