Take FREE!! Online Mettl Mock Test to Crack TechM and Other Companies Written Exams.
Get Off-Campus Placement Jobs Info !!!
TCS NQT Technical and Managerial Round Interview Questions

Technical Discussion :: Soft. Engineering

Home > Freshers > Technical Interview Questions > Soft. Engineering

3. Define cyclomatic complexity?

Answer:

Cyclomatic complexity is a source code complexity measurement that is being correlated to a number of coding errors. It is calculated by developing a Control Flow Graph of the code that measures the number of linearly-independent paths through a program module.

Lower the Program's cyclomatic complexity, lower the risk to modify and easier to understand. It can be represented using the below formula:

Cyclomatic complexity = E - N   2*P 
where,
E
= number of edges in the flow graph.
N
= number of nodes in the flow graph.
P
= number of nodes that have exit points

Asked In :: Virtusa

Post Your Answer Here:

Name *
Email
Alert me

Post Your Reply Here:

Report Error

Please Login First Click Here