Home / CSE MCQs / JUnit MCQs :: Discussion

Discussion :: JUnit MCQs

  1. What is the output of following set of code ?

    int a,b;
    a = (b = 10) + 5;
  2. A.
    b = 10, a = 5
    B.
    b = 15, a = 5
    C.
    a = 15, b = 10
    D.
    a = 10, b = 10

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    b is assigned 10 and after that its value is added with 5 and then saved in a, so a will be 15.


Be The First To Comment