What is the output of the following code snippet of VBScript ?
What is the output of the following code snippet of VBScript ?
18 MOD 7+4*2−10
Show answerHide answer
Correct answer: (D) 2
Explanation
In VBScript, * is evaluated before MOD, and MOD before + and −. 18 MOD 7 = 4 and 4*2 = 8, so 4 + 8 − 10 = 2.