MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SOFTWARE ENGINEERING

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What is Cyclomatic complexity?
A
Black box testing
B
White box testing
C
Yellow box testing
D
Green box testing
Explanation: 

Detailed explanation-1: -Cyclomatic complexity is a software metric in open box testing that helps testers determine the complexity of a software program. It helps in identifying the number of decision points in a code. If the number of decision points is high, the complexity of the code is also high.

Detailed explanation-2: -For example, if source code contains no control flow statement then its cyclomatic complexity will be 1 and source code contains a single path in it. Similarly, if the source code contains one if condition then cyclomatic complexity will be 2 because there will be two paths one for true and the other for false.

Detailed explanation-3: -Answer: b. Explanation: Cyclomatic complexity measures the amount of decision logic in the program module. Cyclomatic complexity gives the minimum number of paths that can generate all possible paths through the module.

Detailed explanation-4: -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-5: -Cyclomatic complexity is a software metric used to indicate the complexity of a program. It is a quantitative measure of the number of linearly independent paths through a program’s source code.

There is 1 question to complete.