What will be the output of the statements below?
On error Resume Next

Sum 100/0
if Sum= 0 Then
msgbox "Pass"

else
msgbox "Fail"

End If

Answers were Sorted based on User's Feedback



What will be the output of the statements below? On error Resume Next Sum 100/0 if Sum= 0 Then ..

Answer / udham singh

if the statement is sum = 100/0
then the answer is
"Pass"

Is This Answer Correct ?    4 Yes 0 No

What will be the output of the statements below? On error Resume Next Sum 100/0 if Sum= 0 Then ..

Answer / chan

It will throw "Divide by zero exception".

Is This Answer Correct ?    2 Yes 1 No

What will be the output of the statements below? On error Resume Next Sum 100/0 if Sum= 0 Then ..

Answer / pushkar1206

It will result as "Pass". If we remove "On error resume next" line then "Divide by zero" error will be thrown by QTP.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

Does QTP supports Linux or Unix OS?.If so which scripting is preferable? Shell we do record and playback

1 Answers  


can the activities of test case design be automated?

0 Answers  


QTP 9.2, Issue: Creating Shared Object repository. I recorded 2 scripts. I exported the Object Repository to a shared location for the first script. Associated the exported repository to the first script and deleted the Local Repository for the First Script. Now Opened the Second script and try to Add the Local Object Repository of 2nd Script to Exported Object Repository. But I fail. Can anyone please help in providing steps that need to be followed in creating a shared object repository? Thanks in Advance.

3 Answers   Google, UHG,


I want to capture data(using keyword) from msdos application using QTP?... Below is little work i could do on it... /* Set app=CreateObject("Wscript.shell") SystemUtil.run ("C:\Users\Agent\Desktop\pumpsim\PUMPSIM.EXE") Window(“PUMPSIM.EXE”).Activate wait(3) app.sendkeys "N" */ Thanks in advance...!!!

0 Answers  


please send detail navigation for merging of object ripositories in QTP 8.2

3 Answers   Infosys, Ordain Solutions,






how we do database testing with qtp using descriptive programming?

22 Answers   Nutrins, Rohit Technologies, Symphony, Syntel, TCS,


What are Add-ins availble in licensed version QTP8.2

1 Answers   TCS,


How to build scripts that access data from external sources?

0 Answers  


Explain about merging of two repositories?

3 Answers  


How will you handle the situation when object is not captured during record?

2 Answers  


Hi, I am supposed to automate mainframe application through qtp. I do not know how to start abt it. Can you plz help me in first initializing the process or do you anybody have a guide book or a link which guides me through the process of automating the mainframe applications and things involved in it.

0 Answers  


in qtp wha t is synchronisatin pt,what is the maximam time out

3 Answers  


Categories