UGC-NET | UGC-NET CS 2017 Nov – III | Question 46

Consider the method mcq ( ):

filter_none

edit
close

play_arrow

link
brightness_4
code

int mcq(boolean a, boolean b, boolean c, boolean d) {
    int ans = 1;
    if (a) {
        ans = 2;
    } else if (b) {
        ans = 3;
    } else if (c) {
  
        if (d) {
            ans = 4;
        }
    }
    return ans;
}

chevron_right


If
M1 = Number of tests to exhaustively test mcq ( );
M2 = Minimum number of tests to achieve full statement coverage for mcq ( ); and
M3 = Minimum number of tests to achieve full branch coverage for mcq ( );
then (M1, M2, M3) = __________.
(A) (16, 3, 5)
(B) (8, 5, 3)
(C) (8, 3, 5)
(D) (16, 4, 4)


Answer: (A)

Explanation:

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.