🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Software Testing: all 10 questions

Quiz: Software Testing · Question 5 of 10

A function has 3 separate if statements (no else-if). What is its cyclomatic complexity?

A function has 3 separate if statements (no else-if). What is its cyclomatic complexity?

  1. A.3
  2. B.4
  3. C.6
  4. D.8
Answer & explanation

Correct answer: 4

V(G) = decisions + 1 = 3 + 1 = 4.

Can you get the rest right without peeking?

Take the timed Quiz: Software Testing quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →