Hi, Anybody could tell me What is the 3rd Largest Number in
the series..Thanks in Advance..

Answers were Sorted based on User's Feedback



Hi, Anybody could tell me What is the 3rd Largest Number in the series..Thanks in Advance....

Answer / saket bharti

a=Array(-1,0,23,-12,98,-300)

Dim temp,i,j

For j=0 to UBound(a)-1

For i=0 to UBound(a)-1

If a(i)<a(i+1) then

temp=a(i+1)

a(i+1)=a(i)

a(i)=temp

End If

Next

Next

Msgbox a(2)

Is This Answer Correct ?    4 Yes 1 No

Hi, Anybody could tell me What is the 3rd Largest Number in the series..Thanks in Advance....

Answer / pushkar1206

a=array(1,22,3,40,12)
For i=0 to ubound(a)
For j=0 to ubound(a)
If a(i)>a(j) then
temp=a(i)
a(i)=a(j)
a(j)=temp
end if
Next
Next
print a(2)

Is This Answer Correct ?    1 Yes 0 No

Hi, Anybody could tell me What is the 3rd Largest Number in the series..Thanks in Advance....

Answer / anwar basha

dim temp,i,j
a=array(5,3,7,9,2,...)

for i=0 to ubound(a)-1
for j=i+1 to ubound(a)
if a(i)>a(j) then
temp=a(i)
a(i)=a(j)
a(j)=temp
end if
next
next
k=ubound(a)-2
msgbox a(k)

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More VB Script Interview Questions

How to replace junk code recorded by QTP with a mall function.

0 Answers  


When importing an excel file that has several columns each with different number of rows into QTP's Global datatable, how can you count the number of rows in a particular column?

3 Answers   Logica CMG, McGraw Hill,


write a vb script code to display the vbscript word by word (i e 1st it should display v then b and up to t )

1 Answers  


Compare java script and vb script?

0 Answers  


i need to login to my yahoo accoutnt using VB Script, automating the operation of webobjects, even launching of IE. How?

1 Answers   Mphasis,






Consider there are objects in a webapp which are identified by QTP. Suppose you know only the logical name of a object(absolutely nothing else about it). Which approach will you take to find the "micClass" of the object(You can't use Object Spy, or can't add the object in repository)?

2 Answers   HCL,


Have any one know about Test Complete 6, please let me know. If any one have good material regarding Test Complete 6, Please send to my mail id: cns.praveen@gmail.com

1 Answers  


Why to add checkpoint in QTP What's the purpose of checkpoints & how to add it

2 Answers  


What is the purpose of drive object of scripting.filesystemobject class in vbscript?

0 Answers  


WHAT IS ENVIRONMENT VARIABLES?and where it is used in real time scenario?

2 Answers  


what is the code in QTP to take screen shot? Please send me any one to my mail id. my mailid is manu.sanepalli@gmail.com

4 Answers   TCS,


How to write functional test cases for send button in gmail.

2 Answers   Arctern,


Categories