GATE 2008
185 questions
MCQ 1851-mark 52 · 2-mark 133
Questions 181–185 of 185
Find if the following statements in the context of software testing are TRUE or FALSE.
(S1): Statement coverage cannot guarantee execution of loops in a program under test.
(S2): Use of independent path testing criterion guarantees execution of each loop in a program under test more than once.
(S1): Statement coverage cannot guarantee execution of loops in a program under test.
(S2): Use of independent path testing criterion guarantees execution of each loop in a program under test more than once.
Answer: (C)
S1 is false. To cover every statement, the tests must run the statements inside a loop body, so the loop is entered and executed. In the GCD example, the inputs (3, 3), (4, 3) and (3, 4) execute every statement, including both branches inside the while loop. So statement coverage does execute loops.
S2 is true. Independent path testing covers a set of linearly independent paths through the control flow graph, and together these paths use every edge, including the edge that goes back from the end of a loop body to the loop test. A path that uses this edge goes round the loop and tests the loop condition again, so each loop is exercised beyond a single pass.
Answer: (C)
S2 is true. Independent path testing covers a set of linearly independent paths through the control flow graph, and together these paths use every edge, including the edge that goes back from the end of a loop body to the loop test. A path that uses this edge goes round the loop and tests the loop condition again, so each loop is exercised beyond a single pass.
Answer: (C)
Provide the best matching between the entries in the two columns given in the table below:
Answer: (C)
- I. Proxy server goes with a. Firewall: a proxy stands between clients and the Internet, so it can filter and control traffic like a firewall.
- II. Kazaa, DC++ go with c. P2P: both are peer-to-peer file sharing applications.
- III. SLIP goes with d. PPP: both are serial-line protocols, and PPP replaced SLIP.
- IV. DNS goes with b. Caching: resolvers cache DNS replies to answer repeated queries quickly.
A proxy can cache too, but DNS cannot act as a firewall, so IV must be Caching and I must be Firewall.
Answer: (C)
- II. Kazaa, DC++ go with c. P2P: both are peer-to-peer file sharing applications.
- III. SLIP goes with d. PPP: both are serial-line protocols, and PPP replaced SLIP.
- IV. DNS goes with b. Caching: resolvers cache DNS replies to answer repeated queries quickly.
A proxy can cache too, but DNS cannot act as a firewall, so IV must be Caching and I must be Firewall.
Answer: (C)
Which of the following is TRUE only of XML but NOT HTML?
Answer: (C)
XML and HTML are both derived from SGML. HTML works with a fixed set of tags, but XML allows you to create your own tags.
Answer: It allows user defined tags
Answer: It allows user defined tags
The exponent of 11 in the prime factorization of 300! is
Answer: (C)
Use Legendre's formula: the exponent of a prime in is .
- : there are 27 multiples of 11 up to 300, and each gives one factor 11.
- : 2 of those multiples are also multiples of , and each gives one extra factor 11.
- , so there are no more terms.
Exponent .
Answer: (C)
- : there are 27 multiples of 11 up to 300, and each gives one factor 11.
- : 2 of those multiples are also multiples of , and each gives one extra factor 11.
- , so there are no more terms.
Exponent .
Answer: (C)
The exponent of 11 in the prime factorization of 300! is
Answer: (C)
The exponent of a prime in is (Legendre's formula). Each multiple of 11 gives one factor 11, each multiple of gives one more, and so on.
(multiples of 11)
(multiples of 121; this is the same as )
, so stop.
Exponent .
Answer: (C)
(multiples of 11)
(multiples of 121; this is the same as )
, so stop.
Exponent .
Answer: (C)