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

In qtp, explain what is keyword driven automation framework?

0 Answers  


Explain about the Test Fusion Report of QTP ?

1 Answers  


How many types of parameters are there in QTP and what are they?

2 Answers  


i have a window , initial its name is "NEW CUSTOMER" i have to enter the details of customer in the test object fields and after saving the window name is automatically changing with the customer name . so how to identify that window after saving. (i am using descriptive programming.)

5 Answers   Syntel,


1. wat are the main diff b/w QTP 8.0 AND QTP 9.2 ( not user interface) 2. wat is the meaning of Keyword in keyword driven frame work? 3. how u will handle the unknown errors while exucution. (not recovery scenario)

0 Answers   HCL,






Is QTP Object Oriented language or Object Based language? What are the OOPS concepts it will support? Why it wont support all the OOPS concepts?

1 Answers   CTS,


I installed QTP 9.5 on vista. Can someone please provide me the license key of the same. Thanks, Avi

2 Answers   Xavient,


what are the attributes of QTP?

3 Answers  


how to convert 100 into hundred repees only and viceversa

0 Answers  


Hi any body pls help me for QTP 11.0 software free demo version. i have to practice. Kindly send the link.or where i have to download.

0 Answers  


I am a newbie to QTP / Automation testing. I want to develop a script that creates a data file automatically with proper headings using VBScript in QTP.

0 Answers   Adea Solutions,


How can we do this one ? at runtime qtpwindow and browser aren't disply on monitor (or) aren't visible on desktop?how?

1 Answers  


Categories