how to reverse a string with out using string or predefined
function,ex:string is " i love india". the output should be
like this "i evol aidni"

Answers were Sorted based on User's Feedback



how to reverse a string with out using string or predefined function,ex:string is " i love ind..

Answer / mogal

str=" i love india"

StrSpl = Split(str," ")

For j = 0 to Ubound(StrSpl)

result1 = result1 & " " & ReverseStr1(StrSpl(j))
Next

msgbox result1

Function ReverseStr1(Str1)
For i = 1 to Len(Str1)
ReverseStr1 = mid(Str1,i,1) & ReverseStr1
Next
End Function

Is This Answer Correct ?    1 Yes 0 No

how to reverse a string with out using string or predefined function,ex:string is " i love ind..

Answer / lak

str=" i love india"

Set regExpObj=new RegExp
regExpObj.pattern="[a-z A-Z]"
regExpObj.global=true

Set matches=regExpObj.execute(str)
For each letter in matches
result=letter.value&result
Next

msgbox result

Is This Answer Correct ?    0 Yes 1 No

how to reverse a string with out using string or predefined function,ex:string is " i love ind..

Answer / siva

You can use StrReverse syntax

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More QTP Interview Questions

Hi, How to invoke QTP or any application through Command Prompt without using Vb script and batch file.... Reply me Srinivas

3 Answers   Excel,


What is the framework your company is following. What is the reason. Explain why key word driven frame work is chosen.

0 Answers   Value Labs,


For an application we automated QTP scripts. At the same time new requirement comes for a new module for the same application and its already developed. So how we automated now this new module with the old application(using old QTP script).

2 Answers   Bosch,


How can we use the "CreateObject("Wscript.Shell")" in QTP and what is the definition and purpose of it?

2 Answers  


Write test cases for copy and past password in password field ?

0 Answers  






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

2 Answers   IBM,


When QTP object wait time is 10 seconds, and in test script wait time is 5 seconds and in function library wait time is 2 seconds how much time does the wait occur? or which is given priority.

0 Answers  


suppose i give valid user id and password to open an web base application on qtp.how qtp will know itis a valid user id and password

3 Answers  


How to retrive the property of an object?

5 Answers  


why we use sendkey method in qtp?

2 Answers   ABC,


How to save your test using quicktest professional?

0 Answers  


How to connect QTP to Testdirector

4 Answers   BirlaSoft, Polaris,


Categories