find the length of the string without using length function?

Answer Posted / cnu_thatavarthi

Option Explicit
Dim strValue,iCount, intcounter

strValue = "thatavarthi"
intcounter = 0
for icount = 1 to len(strValue)
intcounter = intcounter+1

Next
Msgbox intcounter

'Expected Value
---------------------------

---------------------------
11
---------------------------
OK
---------------------------

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is diff between static and dynaic arrys?

1584


How will you get a random number between 0 and 1 in vbscript?

717


Develop a parameterized action that accomplishes the following a. Launch a browser of users choice ( example : IE, chrome etc) b. Open up a search engine (Google, Bing etc) c. Perform a search d. Click a particular link depending on the user’s choice ( 1st , 2nd or third link)

1409


If we take 2 strings as “good” and “bad” then what will ‘+’ and ‘&’ operators return?

534


How are values assigned to string type and numeric type variables?

538






Can someone please tell me what poor design in a relational database (not the layout or style) is and how it can be avoided? PLEASE...im desperate.

1413


How to assign a numeric value to a variable?

618


Can automation testing find ssame no. of bugs what we can find by manual testing?

1467


How to get the length of the string by making use of the string function?

565


How to take whole text output from screen of Bitmap Application.

1870


How will you get the natural logarithm of the given number in vbscript?

603


When to use function procedures and what are its characteristics?

551


Which constant is used for print and display functions and works as same as pressing enter key?

528


What is vbscript language used for and which earlier language is it modeled upon?

531


How are comments handled in the vbscript language?

511