Cyclomatic complexity measures
Tripura Public Service Commission - 2026,
Answer: B
Cyclomatic complexity measures the number of independent logical paths in a program.
Thomas McCabe's metric is computed from the program's control flow graph as \(V(G) = E - N + 2\), where E is the number of edges and N the number of nodes, or simply as the number of decision points plus one. It gives the number of linearly independent paths, and so the minimum number of test cases needed to cover every branch.
It says nothing about the number of lines of code (that is the LOC measure), memory use or execution time.
Please log in or register to report this question.