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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the virtual object?

655


How is recording done when a application is over lapping the QTP application it gives a message object not recorded

1581


What will be happen if i load object repository at run time, but it has already associated.

1268


What does mean by Scope of Automation?n How we defined it?

1586


If I change the property value at runtime is it effect is object repository?

615






how do we know whether all objects are stored in the object repository or not? how can we know if a particular object is not stored in the repository?

1317


In the website, the protocol has been changed http: to https what you will do? Tell me your approach?

568


How to suppress warnings from the test results page?

612


one screen page,that contains file , browse , update and cancel buttons.when we browse a file it should get update otherwise it should go to previous page.write negative test case for that.

1537


Explain the difference between call to action and copy action?

531


How to remove associated function library?

568


Suppose I want fail that check point? How can you do that?

609


Hi All , How can we decicde for pariticular frame(DataDriven or Keword Driven)in Project? Thanks Balaji

1384


What is the limitation to XML Checkpoints?

1618


How to define array in qtp?

582