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

How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s. What's the difference between them? How to handle script issues?

0 Answers  


How should I get results when I run scripts in a Batch mode

1 Answers   TCS,


Which property will you use to check the object state? (Exist)

2 Answers   Symphony,


draw the qtp frame work?

0 Answers  


what is batch testing?

1 Answers  


1. In build1 there is a page with two check boxes and a submit button. You have prepared a script for that page and its working fine. In Build 2 the developers have added two checkboxes in the page. Will the script prepared for Build 1 work for Build 2 or not. If yes, why and if No, why. Remember the developers have not touched the object properties of the textboxes in the page.

3 Answers   ADP,


Hi, i want download attached files in test plan area from QC to local drive in my system using QTP script. Please help me

3 Answers  


Can you import and export data from XLS and how?

4 Answers  


In Manual testing , can u prpare bug report in TD?

1 Answers   TCS,


What is iteration? How it is related to Test Results in QTP

3 Answers   Virinchi Technologies,


what are the design objects in qtp

3 Answers   Wipro,


What is the use of environment variables?

1 Answers  


Categories