Software Engineering · Software Engineering and Web Technology
56 questions · asked in 11 of 27 years (2000–2026)
MCQ 53 · NAT 31-mark 42 · 2-mark 14
2000Questions per year2026
Questions 41–45 of 56
With respect to software testing, consider a flow graph G with one connected component. Let E be the number of edges, N be the number of nodes, and P be the number of predicate nodes of G. Consider the following four expressions:
I. E - N + P
II. E - N + 2
III. P + 2
IV. P + 1
The cyclomatic complexity of G is given by
I. E - N + P
II. E - N + 2
III. P + 2
IV. P + 1
The cyclomatic complexity of G is given by
Answer: (C)
Cyclomatic complexity of a flow graph with one connected component:
(this is II), where E is the number of edges and N the number of nodes.
Each predicate node (a decision with two outgoing edges) adds one more independent path to the single path through the program. So (this is IV), where P is the number of predicate nodes.
I, , is wrong. It matches only when . III, , is one more than the correct value.
So V(G) is given by II or IV.
Answer: (C)
(this is II), where E is the number of edges and N the number of nodes.
Each predicate node (a decision with two outgoing edges) adds one more independent path to the single path through the program. So (this is IV), where P is the number of predicate nodes.
I, , is wrong. It matches only when . III, , is one more than the correct value.
So V(G) is given by II or IV.
Answer: (C)
The cyclomatic complexity of the flow graph of a program provides
Answer: (C)
Cyclomatic complexity ( edges, nodes of the flow graph) equals the number of linearly independent paths in a basis set.
Running one test for each independent path in the basis set executes every statement at least once. So tests are enough, but fewer may also do, because one path can cover many statements. This makes an upper bound on the tests needed, not a lower bound.
The goal of such testing is that each statement is executed at least once, not "at most once", so the options with "at most once" are wrong.
Answer: (C)
Running one test for each independent path in the basis set executes every statement at least once. So tests are enough, but fewer may also do, because one path can cover many statements. This makes an upper bound on the tests needed, not a lower bound.
The goal of such testing is that each statement is executed at least once, not "at most once", so the options with "at most once" are wrong.
Answer: (C)
In a data flow diagram, the segment shown below is identified as having transaction flow characteristics, with identified as the transaction center
A first level architectural design of this segment will result in a set of process modules with an associated invocation sequence. The most appropriate architecture is
A first level architectural design of this segment will result in a set of process modules with an associated invocation sequence. The most appropriate architecture is
Answer: (C)
In transaction mapping, the transaction center (here p2) takes the incoming data from p1 and dispatches to one of several action paths (p3, p4 or p5), depending on the transaction type.
The design has a new controller module at the top. It first calls the incoming branch p1, which receives the data, and then calls the dispatcher p2. p2 then invokes exactly one of p3, p4 or p5.
(A) is wrong: it makes p1 call p2 and has no controller, and p3 would choose between p4 and p5 instead of p2 doing the dispatch. (B) is wrong: it has no controller, and the dispatcher p2 would call p1. (D) is wrong: it makes the dispatcher p2 call the incoming module p1 instead of the controller calling it.
Answer: (C)
The design has a new controller module at the top. It first calls the incoming branch p1, which receives the data, and then calls the dispatcher p2. p2 then invokes exactly one of p3, p4 or p5.
(A) is wrong: it makes p1 call p2 and has no controller, and p3 would choose between p4 and p5 instead of p2 doing the dispatch. (B) is wrong: it has no controller, and the dispatcher p2 would call p1. (D) is wrong: it makes the dispatcher p2 call the incoming module p1 instead of the controller calling it.
Answer: (C)
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
For basis path based testing of this program, its cyclomatic complexity is
Answer: (C)
Nodes (N = 9): , , the test , the test , , , , , .
Edges (E = 10): ; ; ; ; ; ; ; ; ; .
With P = 1 connected component: .
Check: there are 2 decision nodes, so .
Answer: (C)
Edges (E = 10): ; ; ; ; ; ; ; ; ; .
With P = 1 connected component: .
Check: there are 2 decision nodes, so .
Answer: (C)
The availability of a complex software is 90%. Its Mean Time Between Failure (MTBF) is 200 days. Because of the critical nature of the usage, the organization deploying the software further enhanced it to obtain an availability of 95%. In the process, the Mean Time To Repair (MTTR) increased by 5 days. What is the MTBF of the enhanced software?
Answer: (C)
Here MTBF is the time from one failure to the next, so it includes the repair time: , where MTTF is the mean time to failure (the time the software works). Availability is .
Original software: days, so days.
Enhanced software: days and . Since :
days.
(If availability is taken as , the result is about 517 days, but MTBF includes the repair time, so 500 days is the right value.)
Answer: (C)
Original software: days, so days.
Enhanced software: days and . Since :
days.
(If availability is taken as , the result is about 517 days, but MTBF includes the repair time, so 500 days is the right value.)
Answer: (C)
Keep practising
Topics in Software Engineering and Web Technology
Software EngineeringYou are here
Web Technology