Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


The string is like POWER STAR PAVAN , write a script for
this how to findout the number of "A" in the string ?

Answers were Sorted based on User's Feedback



The string is like POWER STAR PAVAN , write a script for this how to findout the number of "A&..

Answer / uday

str="POWER STAR PAVAN"
counter=0
For i=1 to len(str)
strChar=mid(str,i,1)
If strChar="A" Then
counter=counter+1
End If
Next
msgbox counter

Is This Answer Correct ?    17 Yes 0 No

The string is like POWER STAR PAVAN , write a script for this how to findout the number of "A&..

Answer / pavani prasad naidu

Dim oArray
Dim ochr
oStr="POWER STAR PAVAN"
ochr="A"

oArray=split(oStr,ochr)
print ubound(oArray)

Is This Answer Correct ?    6 Yes 0 No

The string is like POWER STAR PAVAN , write a script for this how to findout the number of "A&..

Answer / ram

str="POWER STAR PAVAN"


len1=len(str)


str=replace(str,"a", "")


len2=len(str)

a=len1-len2


msgbox a

Is This Answer Correct ?    6 Yes 5 No

The string is like POWER STAR PAVAN , write a script for this how to findout the number of "A&..

Answer / goms

Val="POWER STAR PAVAN"
If instr(Val,"A")>0 then
Msgbox "Pass"
Else
Msgbox "Fail"
End IF

Note: If instr function returns the position of the value.
If it is greater than 0, the letter is in the particular
variable

Is This Answer Correct ?    1 Yes 0 No

The string is like POWER STAR PAVAN , write a script for this how to findout the number of "A&..

Answer / madhulika

function VerifyLetters(S_String,S_Pattern,MatchStr)
Set OReg = new RegExp
Set S_Pattern = OReg.Pattern
OReg.IgnoreCase = True
OReg.Global = MatchStr
Set Matches = OReg.Test(S_String)
MatchFound = Matches.count
VerifyLetters = MatchFound
End Function
-------------------------------------
val = "Power star pavan"
'Calling function
msgbox VerifyLetters(val,"A",True)

Is This Answer Correct ?    0 Yes 0 No

The string is like POWER STAR PAVAN , write a script for this how to findout the number of "A&..

Answer / seru

str="POWER STAR PAVAN"

Number_of_A=Len(str)-Len(Replace(str,"A",""))
msgbox Number_of_A

Answer is 3

Is This Answer Correct ?    0 Yes 0 No

The string is like POWER STAR PAVAN , write a script for this how to findout the number of "A&..

Answer / ravi

str="POWER STAR PAVAN"
len1=len(str)
msgbox len1
str=replace(str,"A", "")
len2=len(str)
msgbox len2
a=len1-len2
msgbox a

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More QTP Interview Questions

Hi All,I am in wierd situation that my laptop is installed with QTP11 and os is xp sp3.The problem is the descriptive programming which i have written is working in other laptops and it is not working in my laptop.it is clicking the link which is above the testbox instead of typing it in textbox below it.It is same with the other working scripts written by another person.

1 Answers  


There is web page with the webtable,this contains some data, how do you manipulate the data.

2 Answers   Tech Mahindra,


what is KEYWORD DRIVEN TESTING ? I M NOT ASKIN WHAT IS KEY WORD VIEW PLZ ANS FOR ONLY WHAT IS KEYWORD DRIVEN TESTING EXACTLY THANX

3 Answers  


How do we connect QC by using QTP?

2 Answers   Infosys,


Where are the snapshots stored?

2 Answers  


Anybody wants to learn QTP with realtime implementations and complete framework desiging plz contact to this mail id ciraaj@gmail.com

1 Answers  


hi i have one isuue on selecting webcheckbox .there are 15 wecheckboxex i want to select every time 9 th one how can i select plese help me regards balaji

4 Answers  


How to call .vbs functions in QTP? plz Explain indetail

4 Answers   Wipro,


How to get align property of the link on web page?

1 Answers  


Function to convert lowercase to uppercase in QTP Pls anybody can give the answer.. Thanks in advance...

2 Answers   Navis,


i'm using QTP 8.2. A person using QTP 9.0 sends me a QTP TestScript, same when i try to open , an error comes "unexpected file format". Why?? and how to resolve the problem??

2 Answers  


how to create user defined functions in QTP? can any one expalin me with example.. Thanks in Advance for help

4 Answers  


Categories