Microsoft
98-382 · Question #31
98-382 Question #31: Real Exam Question with Answer & Explanation
Sign in or unlock 98-382 to reveal the answer and full explanation for question #31. The question stem and answer options stay visible for context.
Question
You are writing a function that calculates the remainder for integer division. The function receives two parameters, a and b, and must return the remainder that is left over when the integer a is divided by the integer b.
You create the following code. Line numbers are included for reference only.
01 function remainder(a, b) {
02
03
04 }
You want to complete the function for lines 02 and 03.
Which two sets of code segments should you use? Each correct answer presents a complete solution. (Choose two.)
Options
- A02 a = a / b - a; 03 return a;
- B02 b = b % a; 03 return b;
- C02 b %-= a; 03 return b;
- D02 a %= b; 03 return a;
- E02 a = a % b; 03 return a;
- F02 b = b / a - b; 03 return b;
Unlock 98-382 to see the answer
You've previewed enough free 98-382 questions. Unlock 98-382 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.