MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SOFTWARE ENGINEERING

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
The equation V(G)= pi +1 of cyclomatic complexity is applicable only ifevery predicate node has
A
two outgoing edges
B
three or more outgoing edges
C
no outgoing edges
D
none of the above
Explanation: 

Detailed explanation-1: -3) Cyclomatic complexity V(G) = P +1 V (G) = 2 + 1 = 3 Where P is predicate nodes (node 1 and node 2) are predicate nodes because from these nodes only the decision of which path is to be followed is taken.

Detailed explanation-2: -According to rule 2, the formula for Cyclomatic Complexity V(G)=e-n+2 where e is no of edges, n is no of vertices.

Detailed explanation-3: -It is a software metric that measures the logical complexity of the program code. It counts the number of decisions in the given program code. It measures the number of linearly independent paths through the program code.

Detailed explanation-4: -Cyclomatic complexity for aflow graph G is V(G)=E-N+2, where N is the number of nodes and E is the number of edges in the flow graph.

There is 1 question to complete.