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...


i have an array CAPGEMINI .....Here i need to check whether
G is there or not ..how to do that
and friends i have one big doubt that is
whether it is array or string ,how we come to know that and
where we consider that it's array ,where we consider that
it's an string
because when i want to find the length i have big doubt
whether we need to use len function or ubound ...
ans me for this TWO Questions any one please

Answers were Sorted based on User's Feedback



i have an array CAPGEMINI .....Here i need to check whether G is there or not ..how to do that an..

Answer / udayakiran

This might be the solution If we consider it as array:

ar2 = Array("C","A","P","G","E","M","I","N","I")

arlen=UBound(ar2)-lbound(ar2)+1 'Finding array length

For p= 0 to arlen-1
If strcomp(ar2(p),"G")=0 Then
msgbox "The letter G is found"
Exit For
End If
Next

Is This Answer Correct ?    3 Yes 0 No

i have an array CAPGEMINI .....Here i need to check whether G is there or not ..how to do that an..

Answer / tarakeshwar

a="CAPGEMINI"
length = len(a)
flag ="G is not present"
For i = 1 to length
res= mid(a,i,1)
if res = "G" then
flag = "G is present"
End if
Next
msgbox flag

Is This Answer Correct ?    3 Yes 0 No

i have an array CAPGEMINI .....Here i need to check whether G is there or not ..how to do that an..

Answer / arun

Please try this

Dim AR2,i
AR2 = Array("C","A","P","G","E","M","I","N","I")

For i=0 to ubound(AR2)
If AR2(i)="G" Then
msgbox "G found in Array"
End If
Next

Is This Answer Correct ?    3 Yes 0 No

i have an array CAPGEMINI .....Here i need to check whether G is there or not ..how to do that an..

Answer / gabbar

Dim a
a=array("CAPGEMINI" )
If len(join(a))<>len(Replace(join(a),"G","")) Then
msgbox "Occurance of G in array: "&len(join(a))-len(Replace(join(a),"G",""))
End If

Is This Answer Correct ?    2 Yes 0 No

i have an array CAPGEMINI .....Here i need to check whether G is there or not ..how to do that an..

Answer / koteswar

str = "CAPGEMINI"
z= "G "
flag = 0
For i = 1 to len(str)
x = mid(str, i, 1)
If Instr(1,z,x,1) Then
msgbox z
If flag = 0 Then
Reporter.ReportEvent micPass, "The required Letter is
available in the stirng", "True"
else
Reporter.ReportEvent micFail , " The required Letter is
not availabe in the string" , "False"
End If
End IF
Next

Array means It is a collection of similar objects and
enclosed with curly braces. at that time you can use Ubound
for count the no of objects are available in the given array

Srring means single or collection alphanumeric characters
enclosed with quotations. If you want to count the no of
characters in the given string you can use len()

Is This Answer Correct ?    1 Yes 0 No

i have an array CAPGEMINI .....Here i need to check whether G is there or not ..how to do that an..

Answer / rajesh

see that is my question...here you also confused, here
CAPGEMINI is a array ,not a string..give a ans please

Is This Answer Correct ?    1 Yes 0 No

i have an array CAPGEMINI .....Here i need to check whether G is there or not ..how to do that an..

Answer / ganesh

ok koteshwar can u explain about flag = 0

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More QTP Interview Questions

what are the different types of framesworks in QTP?what is the keyword driven framework?

2 Answers   Mindlance,


What is expert view and keyword view?

0 Answers  


I need Major Help with a Script I recorded in QTP 9.5. I am recording scripts for a Web-based application(s) I have all the URLs for each application in Excel spreadhsheet so that QTP can pull that particular application from the spreadsheet and run it. The problem is QTP isn't recognizing one particular URL so when I hit run in QTP to run this script it opens the internet Explorer but isn't open the URL I have in the Excel spreadsheet. I've retyped the URL and still QTP won't open this Particular one for some reason. The site its self is working fine but for whatever reason QTP won't open it. How do I resolve this? I have a deadline of next Friday the 7th to complete this task so please help me in any way you can. Thanks in advance

0 Answers  


waht is the difference between QTP 8.2 and 9.0 version

15 Answers   AppLabs, CTS, Polaris,


I am using Shared OR, and my collegues are also using Shared OR. How to merge Object Repositories?

6 Answers  


How can i find out any "text's" coordinates in excel sheet For example: I want to know the coordinates of "F" Column in the excell sheet While recording when i clicked on F column it is showing the coordinate values 385,9 but with out recording how can i find out them Suppose i want to clik on "H" column writing the script like this Window("Book1").WinObject("Book1").Click (...........) Here I Dont know what (x y )values should i enter Please any one can help me?

1 Answers   Livetek,


difference between multiple parameterization and data driven wizard in QTP?

1 Answers  


How should I check my code( Before going to execute) without executing the script in QTP

1 Answers  


What is the latest version in QTP?

55 Answers   Bharti, Polaris, US Technology,


How many types of recording facility are available in QTP?

1 Answers  


1. Can anyone help me with recovery scenarios, each type with examples and also what is on error resume next?

1 Answers  


hi friends i was tried to connect qtp with oracle database using provider.i got a error.so anyone can help me out by correct script

2 Answers  


Categories