cyclomatic complexity in software engineering Question-Answer
Cyclomatic Complexity in Software Engineering Question-Answer
Q1|Cyclomatic Complexity A flow graph F with entry node (1) and exit node (11) is shown below:
How many predicate nodes are there and what are their names
A – Three: (1, (2,3), 6)
B – Three: (1, 4, 6)
C – Four: ((2,3), 6, 10, 11)
D – Four: ((2,3), 6, 9, 10)
Show Answer With Best Explanation
ANswer -A
Q2 |Cyclomatic Complexity A flow graph F with entry node (1) and exit node (11) is shown below:
How many regions are there in flow graph F
A – 2
B – 3
C – 4
D – 5
Show Answer With Best Explanation
ANswer -C
Q3 |Cyclomatic Complexity A flow graph F with entry node (1) and exit node (11) is shown below:
What is the cyclomatic complexity of flowgraph F
A – 2
B – 3
C – 4
D – 5
Show Answer With Best Explanation
ANswer -C
Q4 |Cyclomatic Complexity A flow graph F with entry node (1) and exit node (11) is shown below:
How many nodes are there in the longest independent path?
A – 6
B – 7
C – 8
D – 9
Show Answer With Best Explanation
ANswer -C
Q5|Cyclomatic Complexity
A flow graph F with entry node (1) and exit node (11) is shown below:
How many nodes are there in flow graph F?
A – 9
B – 10
C – 11
D – 12
Show Answer With Best Explanation
ANswer -A
Cyclomatic Complexity in Software Engineering Question-Answer
Q6➡|Cyclomatic Complexity The cyclomatic complexity of each of the modules A and B shown below is 10. what is the cyclomatic complexity of the sequential integration shown on the right hand side?
i ➥ 19
ii ➥ 21
iii ➥ 20
iv ➥ 10
Show Answer With Best Explanation
Answer: i Explanation:
Q7➡|Cyclomatic Complexity To 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
i ➥ 5
ii ➥ 4
iii ➥ 3
iv ➥ 2
Show Answer With Best Explanation
Answer: iii Explanation:
Q8➡|Cyclomatic Complexity The Cyclomatic Complexity metric V(G) of the following control flow graph
i ➥ 6
ii ➥ 5
iii ➥ 4
iv ➥ 3
Show Answer With Best Explanation
Answer: iii Explanation:
Cyclomatic Complexity in Software Engineering Question-Answer
Q9➡|Cyclomatic Complexity What is the cyclomatic complexity of a module which has seventeen edges and thirteen nodes?
i ➥ 7
ii ➥ 6
iii ➥ 5
iv ➥ 4
Show Answer With Best Explanation
Answer: ii Explanation:
Q10➡|Cyclomatic Complexity Which one of the following is used to compute cyclomatic complexity ?
i ➥ P + 1, where P is the number of predicate nodes in the flow graph G.
ii ➥ P – 1, where P is the number of predicate nodes in the flow graph G.
iii ➥ E – N + 1, where E is the number of flow graph edges and N is the number of flow graph nodes.
iv ➥ The number of regions – 1
Show Answer With Best Explanation
Answer: i Explanation:
Q11➡|Cyclomatic Complexity The Function Point (FP) metric is :
i ➥ Calculated from software​ s complexity assessment
ii ➥ Calculated from Lines of code
iii ➥ Calculated from user requirements
iv ➥ None of the above
Show Answer With Best Explanation
Answer: i Explanation:
Q12➡|Cyclomatic Complexity Consider module M, which is a serial integration of two sub-modules, A and B, having cyclomatic complexities of 10 and 8 respectively. What is the cyclomatic complexity of the integrated module M?
i ➥ 19
ii ➥ 17
iii ➥ 20
iv ➥ 22
Show Answer With Best Explanation
Answer: ii Explanation:
Q13➡|Cyclomatic Complexity McCabe’s cyclomatic metric V(G) of a graph G with n vertices, e edges and p connected component is
i ➥ e
ii ➥ n
iii ➥ e – n + p
iv ➥ e – n + 2p
Show Answer With Best Explanation
Answer: iv Explanation:
Cyclomatic Complexity in Software Engineering Question-Answer
Q14➡|Cyclomatic Complexity In Software Metrics, McCABE​ S cyclomatic number is given by following formula :
i ➥ c=e-n+2p
ii ➥ c=e-n-2p
iii ➥ c=e+n+2p
iv ➥ c=e-n* 2p
Show Answer With Best Explanation
Answer: i Explanation:
Q15➡|Cyclomatic Complexity The Function Points(FP) calculated for software projects are often used to obtain an estimate of Lines of code(LOC) required for that project. Which of the following statements is FALSE in this context?
i ➥ The relationship between FP and LOC depends on the programming language used to implement the software
ii ➥ LOC requirement for an assembly language implementation will be more for a given FP value, than LOC for implementation in COBOL.
iii ➥ On an average, one LOC of C++ provides approximately 1.6 times the functionality of a single LOC of FORTRAN
iv ➥ FP and LOC are not related to each other
Show Answer With Best Explanation
Answer: iv Explanation:
Q16➡|Cyclomatic Complexity In function point analysis, the number of complexity adjustment factors is
i ➥ 10
ii ➥ 12
iii ➥ 14
iv ➥ 20
Show Answer With Best Explanation
Answer: iii Explanation:
Q17➡|Cyclomatic Complexity Which one of the following is not a source code metrics ?
i ➥ Halstead metric
ii ➥ Function point metric
iii ➥ Complexity metric
iv ➥ Length metric
Show Answer With Best Explanation
Answer: ii Explanation:
Q18➡|Cyclomatic Complexity To compute function points (FP), the following relationship is used FP = Count – total × (0.65 + 0.01 × Σ(Fi)) where Fi (i = 1 to n) are value adjustment factors (VAF) based on n questions. The value of n is
i ➥ 12
ii ➥ 14
iii ➥ 16
iv ➥ 18
Show Answer With Best Explanation
Answer: ii Explanation:
Q19➡|Cyclomatic Complexity Which one is measure of software complexity ?
i ➥ Number of lines of code (LOC)
ii ➥ Number of man years
iii ➥ Number of function points (FP)
iv ➥ Both LOC and FP
Show Answer With Best Explanation
Answer: iv Explanation:
Q19➡|Cyclomatic Complexity The extent to which a software tolerates the unexpected problems, is termed as:
i ➥ Accuracy
ii ➥ Reliability
iii ➥ Correctness
iv ➥ Robustness
Show Answer With Best Explanation
Answer: iv Explanation:
Q20➡|Cyclomatic Complexity What is the modality of relationship, if there is no explicit need for relationship to occur?
i ➥ 1
ii ➥ 0
iii ➥ 3
iv ➥ 2
Show Answer With Best Explanation
Answer: ii Explanation: → The modality is 1 if an occurrence of the relationship is mandatory
→ The modality of a relationship is 0 if there is no explicit need for the relationship to occur or the relationship is optional.
Q21➡|Cyclomatic Maturity ,Complexity A legacy software system has 940 modules. The latest release require that 90 of these modules be changed. In addition, 40 new modules were added and 12 old modules were removed. Compute the software maturity index for the system.
i ➥ 0.725
ii ➥ 0.923
iii ➥ 0.849
iv ➥ 0.524
Show Answer With Best Explanation
Answer: iii Explanation: Formula:- Software Maturity Index(SMI) = [M​T​ – (F​ c​ + F​ a​ + F​ d​ )] / M​ T M​T​ = The number of modules in the current release F​c = The number of modules in the current release that have been changed F​a​ =The number of modules in the current release that have been added F​d​ =The number of modules from the preceding release that were deleted in the current release SMI = [940-(90+40+12)]/940 SMI = 0.849
Q22➡|Cyclomatic Maturity ,Complexity What is the Cyclomatic Complexity of the following flow-graph of a software code?