exam questions

Exam 70-483 All Questions

View all questions & answers for the 70-483 exam

Exam 70-483 topic 1 question 32 discussion

Actual exam question from Microsoft's 70-483
Question #: 32
Topic #: 1
[All 70-483 Questions]

DRAG DROP -
You are testing an application. The application includes methods named CalculateInterest and LogLine. The CalculateInterest() method calculates loan interest. The LogLine() method sends diagnostic messages to a console window.
You have the following requirements:
✑ The CalculateInterest() method must run for all build configurations.
✑ The LogLine() method must be called only for debug builds.
You need to ensure that the methods run correctly.
How should you complete the relevant code? (To answer, drag the appropriate code segments to the correct locations in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
StudiousMCSD
Highly Voted 5 years, 1 month ago
Correct answer is: #if DEBUG #endif
upvoted 40 times
ndlp43
4 years, 4 months ago
StudiousMCSD is right resource:https://stackoverflow.com/a/975370
upvoted 1 times
...
...
patoyanez
Highly Voted 5 years, 10 months ago
answers: Insert the following code segment at line 10: [Conditional(“DEBUG”)] Insert the following code segment at line 05: #if DEBUG Insert the following code segment at line 07: #endif
upvoted 15 times
dominikeps
4 years, 8 months ago
This answers: Insert the following code segment at line 10: [Conditional(“DEBUG”)] is not a possibility because there is no slot
upvoted 2 times
tanujgyan
4 years, 8 months ago
Its not about slot only. They have mentioned the method should run for all build configuration. Adding [Conditional(“DEBUG”)] on top of method would make it run for debug build only
upvoted 4 times
Kilsimon
4 years, 2 months ago
The answer from patoyanez is not for this question specifically. There exists another version of this question, where you have to "select all that apply" where he is right. Note: he wrote on line 10 and not on line 1, which results in the correct answer. LogLine should only run for debug versions.
upvoted 1 times
...
...
...
...
noussa
Most Recent 3 years, 11 months ago
On another website, you're asked to choose 2, so the Correct answers are D and G. Question and response are within this link: https://www.briefmenow.org/microsoft/what-are-two-possible-ways-to-achieve-this-goal-251/
upvoted 1 times
...
devpride
4 years, 1 month ago
#if DEBUG ... #endif is correct
upvoted 3 times
...
rodrigoleitetr
5 years, 6 months ago
A. Insert the following code segment at line 01: #region DEBUG Insert the following code segment at line 10 :#endregion B. Insert the following code segment at line 01: [Conditional("DEBUG")] C. Insert the following code segment at line 05 :#region DEBUG Insert the following code segment at line 07: #endregion D. Insert the following code segment at line 10: [Conditional("DEBUG")] E. Insert the following code segment at line 01: #if DEBUG Insert the following code segment at line 10: #endif F. Insert the following code segment at line 10: [Conditional("RELEASE")] G. Insert the following code segment at line 05: #if DEBUG
upvoted 6 times
...
Oziriz
5 years, 10 months ago
Options in the question not shown
upvoted 6 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago