exam questions

Exam 70-483 All Questions

View all questions & answers for the 70-483 exam

Exam 70-483 topic 1 question 85 discussion

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

You are developing code for a class named Account. The Account class includes the following method:

You need to ensure that overflow exceptions are thrown when there is an error.
Which type of block should you use?

  • A. checked
  • B. try
  • C. using
  • D. unchecked
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
dddeee
Highly Voted 5 years ago
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/checked
upvoted 11 times
...
sharpcode
Highly Voted 5 years, 2 months ago
What even is checked? Wasn't mentioned during my study/book and video tutorials...
upvoted 5 times
noussa
4 years, 5 months ago
The checked keyword is used to explicitly enable overflow checking for integral-type arithmetic operations and conversions. By default, an expression that contains only constant values causes a compiler error if the expression produces a value that is outside the range of the destination type
upvoted 2 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 ...