What is McCabe’s cyclomatic complexity number a) attempting to measure, and b) what is the cyclomatic complexity number of a program A that contains 3 binary predicates (or branches)?


What is McCabe’s cyclomatic complexity number a) attempting to measure, and b) what is the cyclomatic complexity number of a program A that contains 3 binary predicates (or branches)?


Answer:
a) McCabe’s cyclomatic complexity number measures the control flow complexity of software.
b) Using the simple formula of (#of binary branches + 1), the cyclomatic number of program A is (3+1) or 4.