exam questions

Exam MB-500 All Questions

View all questions & answers for the MB-500 exam

Exam MB-500 topic 4 question 23 discussion

Actual exam question from Microsoft's MB-500
Question #: 23
Topic #: 4
[All MB-500 Questions]

A company uses Dynamics 365 Finance.

You are performing a code review for several segments of code that use the Boolean data type.

You need to validate the segments for the correct X++ structure.

Which two code statements will compile? Each correct answer presents a complete solution.

NOTE: Each correct selection is worth one point.

  • A. boolean exprValue; exprValue = (8*6 == 48);
  • B. boolean exprValue = (8*6 == ‘48’) ? Yes:No;
  • C. boolean exprValue; exprValue = (8*6 == 48) ? 1:0;
  • D. boolean exprValue = (8*6 == ‘48’) ? false:true;
Show Suggested Answer Hide Answer
Suggested Answer: AC 🗳️

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
smithlaod
1 year ago
AD is correct. In X++, boolean data type is true or false, not 1 and 0.
upvoted 1 times
JKHenry
10 months, 2 weeks ago
No, False = 0, true =1. And 8*6 = 48, not 8*6 = '48'
upvoted 5 times
smithlaod
8 months, 3 weeks ago
You are right, thanks for your comment. According: https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-ref/xpp-data-primitive#boolean
upvoted 1 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