9th Class Computers Science Visual Reasoning Question Bank Introduction to Visual Basic

  • question_answer
    What would be the value of variable res after execution?
    res = 9 Mod 2+1-2
     

    A) -1

    B) 3

    C) 0                     

    D) 4

    Correct Answer: B

    Solution :

    Mod operator returns the remainder after division, so, the given arithmetic expression would evaluate as 1+1-2 \[\to \]0


You need to login to perform this action.
You will be redirected in 3 sec spinner