You need to ensure that the debugger breaks execution within the CalculateInterest() method when…

You are debugging an application that calculates loan interest. The application includes the
following code. (Line numbers are included for reference only.)

You need to ensure that the debugger breaks execution within the CalculateInterest()
method when the loanAmount variable is less than or equal to zero in all builds of the
application.
What should you do?

You are debugging an application that calculates loan interest. The application includes the
following code. (Line numbers are included for reference only.)

You need to ensure that the debugger breaks execution within the CalculateInterest()
method when the loanAmount variable is less than or equal to zero in all builds of the
application.
What should you do?

A.
Insert the following code segment at line 03:
Trace.Assert(loanAmount > 0);

B.
Insert the following code segment at line 03:
Debug.Assert(loanAmount > 0);

C.
Insert the following code segment at line 05:
Debug.Write(loanAmount > 0);

D.
Insert the following code segment at line 05:
Trace.Write(loanAmount > 0);



Leave a Reply 10

Your email address will not be published. Required fields are marked *


Anon

Anon

It’s about the debugger, so correct answer is B

Shubham Mishra

Shubham Mishra

It’s for all builds, so A is right!

Leonardo

Leonardo

All builds configurations!

sandip

sandip

It’s for all builds, so A is right!

j

j

correct A – “in all builds of the application”
(B – in debug mode)

Deno

Deno

correct A – “in all builds of the application”

B is only in debug mode

Kashish

Kashish

A is the right answer, chapter closed, no discussions further!

ManojP

ManojP

B is right answer as question starts with “You are debugging an application that calculates loan interest”..
It’s not about all..

ManojP

ManojP

my bad at last it’s mentioned “in all builds of the application.”
correct answer is A only..