reverse the string without using reverse string?

Answers were Sorted based on User's Feedback



reverse the string without using reverse string?..

Answer / cnu_thatavarthi

Option Explicit
Dim strValue,iCount, strNewValue

strValue = "CapGemini"

For iCount = Len(strValue) To 1 Step -1

strNewValue = strNewValue& Mid(strValue,iCount,1)

Next

strNewValue = Trim(strNewValue)
MsgBox strNewValue

'Expected value
---------------------------

---------------------------
inimeGpaC
---------------------------
OK
---------------------------

Is This Answer Correct ?    0 Yes 0 No

reverse the string without using reverse string?..

Answer / rajani_kanth

Option Explicit
Dim a,c,d,i
a="RajaniKanth"
For i=Len(a) To 1 Step-1
c=Mid(a,i,1)
d=d&c
Next
MsgBox d

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More VB Script Interview Questions

I'm new to QTP, i facing a a problem in the script says"Object not found", "Browser("").page("").frame(Name:=fminfo).webtable(). the issue is, QTp is not able to identify the web table in run time.becuase in that fram"fminfo" there are "n"table and the table do not have the names,Html id. 1) i need to count the number webtables available on that page. 2)need to identify the webtable cell values. 3)How Loop the once i get the count and retrive the cell data of each webtable? Can anyone help on this, plz.. Thanks, Suresh

3 Answers  


Check whether given Number is Even or Odd?

2 Answers   HDFC,


Difference between Do while loop and while wend loop

1 Answers  


pls tell me which is good book or site for vbscript?

1 Answers   Mind Tree,


Explain the filter expression?

0 Answers  






Which keyword is used to declare a variable in the vbscript language?

0 Answers  


What is string concatenation function in VBScript?

2 Answers  


VBscript for QTP,best tutorial?

2 Answers   Wipro,


how to retrieve native property value in runtime?

1 Answers   Hexaware,


write a program to display the system specifications of client system with the help of vb script.

1 Answers  


How can you have different number of cells for each row of a table in HTML?

2 Answers  


what is the use of Data base check point ?

3 Answers  


Categories