The cyclomatic complexity metric provides the designer with information regarding the number of

  1. Cycles in the program

  2. Errors in the program

  3. Independent logic paths in the program

  4. Statements in the program


Correct Option: C

AI Explanation

To answer this question, we need to understand the concept of cyclomatic complexity.

Cyclomatic complexity is a software metric that measures the complexity of a program by analyzing the number of independent paths through the program's source code. It provides the designer with information about the number of decision points or branches in the program.

Option A) Cycles in the program - This option is incorrect. Cyclomatic complexity is not directly related to cycles in the program. It measures the number of independent paths, not the number of cycles.

Option B) Errors in the program - This option is incorrect. Cyclomatic complexity does not provide information about errors in the program. It is a metric used to measure complexity, not to detect errors.

Option C) Independent logic paths in the program - This option is correct. Cyclomatic complexity measures the number of independent logic paths in the program. It helps the designer understand how complex the program is and identify potential areas of complexity that may require additional testing or refactoring.

Option D) Statements in the program - This option is incorrect. Cyclomatic complexity is not concerned with the number of statements in the program. It focuses on the number of decision points or branches.

Therefore, the correct answer is C) Independent logic paths in the program because cyclomatic complexity provides the designer with information about the number of independent logic paths in the program.

Find more quizzes: