edited by
2,784 views
4 votes
4 votes

Tb carry out white box testing of a program, its flow chart representation is obtained as shown in the figure below:

For basis path based testing of this program, its cyclomatic complexity is

  1. $5$
  2. $4$
  3. $3$
  4. $2$
edited by

2 Answers

Best answer
7 votes
7 votes
No. of Nodes(N) = 9

No. of Edges(E) = 10

Cyclomatic Complexity = E - N + 2P

                                  = 10 -9 + 2*1

                                  = 3
selected by
0 votes
0 votes
another way to answer is number of conditional statement +1==3.
Answer:

Related questions

3 votes
3 votes
1 answer
2
Ishrat Jahan asked Nov 2, 2014
3,837 views
Consider the following program module:int module1 (int x, int y) { while (x! = y) { if (x y) x = x - y, else y = y - x; } return x; }What is Cyclomatic complexity of the...
5 votes
5 votes
3 answers
4