write the code to reverse a string without using Strrev
built in function.

Answer Posted / fatekiller

code to reverse a string

first i wrote a function and then called that function to
reverse a string.


mystr=inputbox("enter the string")
ms=revstr(mystr)
print(ms)


Function revstr(mystr)
L=len(mystr)
revstrr=""
For i=0 to L-1
c=mid(mystr,L-i,1)
revstrr=revstrr&c

Next
revstr=revstrr
End Function

This program is written using the concept of MID function.

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the default object synchronization timeout in qtp?

882


What is the difference between Keyword Driven test and Data Driven test?

1993


What is keyword view in qtp?

718


If you have two monitors one is of 19inch and the 2nd one is of 24inch,if you want to write same QTP script in both the two monitors is there any changes required in the script?

1762


How do you capture tooltip using QTP?

821


How to use debug tools?

2430


What is recovery scenario manager? When you go for recovery scenario manager? Tell me one scenario were your used recovery scenario in your project?

791


Write a script to customize the test results in PDF and HTML format.

2318


How to do the scripting. Are there any inbuilt functions in QTP? What is the difference between them? How to handle script issues?

810


Explain the differences between table and db checkpoints?

754


What is the file extension of the code file in qtp?

764


To which environments does quicktest professional (qtp) supports?

773


After fixing the bug, the same bug is raising again and again in new builds what we have to do? That bug is high level bug.

6690


How can i use virtual objects? If have i created one new virtual object in a virtual object manager by following instructions.

1701


Can any one say what exact diff between test->parameters, action properties-> parameters. after defining the parameters in test->settings, how can we access those parameters.(i know how to use action prop parameters)

1853