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

How you can delete excel file in qtp?

0 Answers  


How to do the scripting. Is there any inbuilt functions in QTP as in QTP-S. Whatz the difference between them? how to handle script issues?

2 Answers  


Define Error Pane of UFT?

0 Answers  


I am sathish , i want to test the Application of JIL.org ,Mobile Emulator ,by using QTP10.0. I am trying to do testing on that Application , but Child Objects are not identified by the QTP. Please can any one help me

1 Answers  


How do you learn the object in QTP?

2 Answers  


what is the smart identification techniqu?what r the different mechanisums used in it?

2 Answers   Accenture,


When to use shared and local object repository?

0 Answers  


HOW do we find a datasheet when there are 4 datasheets in data table.this question was asked by covansys interview.

5 Answers   CTS,


Tell me Three major differences between QTP & Winrunner?

5 Answers  


somebody please say me why we go for using regular expressions,actions.what is the main and exact use of this in real time applications.real time testers pls answer my question with example if u can

4 Answers  


In a flight window we have to enter the name and meal request for every passenger.In that window if we give Total passengers=1 then the Psngr1 name field and psngr1 meal request field will reflects.if we give Total passengers=2 then Psngr1 name field and psngr1 meal request field,Psngr2 name field and psngr2 meal request field and so on. how we can handle this scenerio thru Descriptive programming?

0 Answers  


What is Automation frame work.How we will prepare in real time.

9 Answers   AppLabs,


Categories