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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / m.bindu kumar

'Code to reverse a string without using strrev using
functions

Function stringreverse(a)
strlen=len(a)
For i = strlen to 1 step -1
strrev=mid(a,i,1)
stn=stn+strrev
Next
msgbox stn
End function

Dim strrev,strlen, strname,stn
a=inputbox ("enter the string to reverse")
stringreverse(a)

Is This Answer Correct ?    3 Yes 6 No

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

Answer / ram

x="abcdefg"
v= len(x)
For i=1 to len(x)

newstr=mid(x, v,1)

a=a&newstr

v=v-1
Next


msgbox a

Is This Answer Correct ?    2 Yes 5 No

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

Answer / guest

strrev("star")

Is This Answer Correct ?    3 Yes 37 No

Post New Answer

More QTP Interview Questions

Count the number of radio buttons and randomly select one.

1 Answers   Deloitte,


What do you do if QTP doesn't recognize object ,what action should be taken

11 Answers   Lehman Brothers,


Why use Regular Expressions?

1 Answers  


How many ways we can parameterize data in QTP?

6 Answers   Liquid Crystal,


how to record a word doc using qtp i.e open a word doc,type something and save the doc can someone send me the code.

3 Answers  






can any one tell me how to select some text.i need the script for that

1 Answers  


hi, for QTP TRAINING......SURESH REDDY SMART SOLUTIONS sr.nagar IS BEST OR NOT? how faculty teaches?

4 Answers   Cap Gemini,


How can you capture(Read) the values from a Table?

1 Answers  


What kind of errors can b handled in QTP in real time scenario?

1 Answers  


what is the difference between window command and dialog command

1 Answers  


there is 3 flash player buttons does QTP identify them or not else we have to do install anything related that software if we have to install what is that software and how we install it into QTP8.2 GIVE ME EXCAT ANSWER IF U KNOW.

1 Answers  


When I used random numbers(1 to 9) with regular expression and run the test, it runs only 5 iterations with passed result instead of running all 1 to 9. Please tell me what can be the reason

0 Answers  


Categories