how to find number of characters(letter a) in
the sentence
Rain Rain Go away
Answer Posted / megha gupta
Dim Str, p,temp,i,l
i=0
Str= inputbox("Enter the string","User input 1")
p= inputbox("Enter the character you want to search in
specified string", "User Input 2")
l= Len(str)
Do while l>0
temp= left(str,1)
str= Right(str,l)
l=l-1
If (temp=p) Then
i=i+1
End If
Loop
Msgbox "Number of times "& p &" character in string is : "&
i &""
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Why to use option explicit in vb script?
How will you reverse a string in vbscript?
Explain about scrrun.dll in vbscript?
How many types of operators are available in the vbscript language?
What is the difference between javascript and vbscript?
What is the use of option explicit in vbscript?
Explain the .wsf files?
Explain the string concatenation function in vbscript?
about vb scripting programs this type of all question& answers
What is dictionary object in vbscript? Explain?
How are values assigned to the variables in the vbscript language?
How to assign a numeric value to a variable?
Write a test case using Test if the images,a particular test exists,check if the page links match,page response is within a certain range,parameterization of the test,the test should comprise of actions,the test should use a custom function,the test should use global repository
Which date function is used in the vbscript language to find the difference between the 2 dates?
Which constant is used for print and display functions and works as same as pressing enter key?