All mock tests are FREE till 31 December — register to save your progress
Unit 6 · Software Engineering NTA UGC NET November 2017

Consider the method mcq():
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;
}

Let M1 = number of tests to exhaustively test mcq(), M2 = minimum number of tests to achieve full statement coverage, and M3 = minimum number of tests to achieve full branch coverage. Then the value of (M1, M2, M3) is:

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: A. (A) (16, 3, 5)

More Software Engineering questions