+2 votes
in Software Engineering by

1 Answer

+3 votes
selected by (user.guest)
Best answer

Cyclomatic complexity is a software metric used to measure the complexity of a given software code. It is said to correlate strongly with a number of coding errors. You can visualize the cyclomatic complexity by developing a Control Flow Graph that measures the number of linearly independent paths through a program module.

Flow Graph Notation

How is the Cyclomatic Complexity Calculated?

The code complexity of a given software code is defined by the formula:

V(G)  = E - N + 2


E - Number of Edges

N - Number of Nodes

A software tool that will compute the cyclomatic complexity for any given C/C++ code? I found a tool online that does just that - Metrix++.

Metrix is a tool to collect and analyse code metrics. This software can parse C/C++, C# and Java source codes. Read the documentations and download from here -> https://metrixplusplus.github.io/home.html#overview_section

Happy learning!

Related questions

Welcome to CPEN Talk
Solution-oriented students of computer engineering on one platform to get you that


Chuck Norris originally appeared in the "Street Fighter II" video game, but was removed by Beta Testers because every button caused him to do a roundhouse kick. When asked about this glitch, Norris replied "That's no glitch."