GATE 2015 (Session 1)
65 questions
MCQ 45 · NAT 201-mark 30 · 2-mark 35
Questions 16–20 of 65
Match the following:
| (P) Condition coverage | (i) Black-box testing |
| (Q) Equivalence class partitioning | (ii) System testing |
| (R) Volume testing | (iii) White-box testing |
| (S) Alpha testing | (iv) Performance testing |
Answer: (C)
(P) Condition coverage measures which conditions in the code have been exercised, so it needs the code: white-box testing (iii).
(Q) Equivalence class partitioning groups the inputs using only the specification, without looking at the code: black-box testing (i).
(R) Volume testing checks how the system behaves with large amounts of data: performance testing (iv).
(S) Alpha testing is done on the complete system by users at the developer's site before release: system testing (ii).
So P-iii, Q-i, R-iv, S-ii.
Answer: (C)
(Q) Equivalence class partitioning groups the inputs using only the specification, without looking at the code: black-box testing (i).
(R) Volume testing checks how the system behaves with large amounts of data: performance testing (iv).
(S) Alpha testing is done on the complete system by users at the developer's site before release: system testing (ii).
So P-iii, Q-i, R-iv, S-ii.
Answer: (C)
Which of the following is/are correct inorder traversal sequence(s) of binary search tree(s)?
I. 3, 5, 7, 8, 15, 19, 25
II. 5, 8, 9, 12, 10, 15, 25
III. 2, 7, 10, 8, 14, 16, 20
IV. 4, 6, 7, 9, 18, 20, 25
I. 3, 5, 7, 8, 15, 19, 25
II. 5, 8, 9, 12, 10, 15, 25
III. 2, 7, 10, 8, 14, 16, 20
IV. 4, 6, 7, 9, 18, 20, 25
Answer: (A)
The in-order traversal of a BST is always in sorted order.
- I: sorted valid
- II: 12 comes before 10 not valid
- III: 10 comes before 8 not valid
- IV: sorted valid
Answer: I and IV only
- I: sorted valid
- II: 12 comes before 10 not valid
- III: 10 comes before 8 not valid
- IV: sorted valid
Answer: I and IV only
Which one of the following is TRUE at any valid state in shift-reduce parsing?
Answer: (C)
In a valid shift-reduce parse, the stack always holds a viable prefix. A viable prefix is a prefix of some right sentential form that does not go past the right end of the handle. Every prefix of a viable prefix is also a viable prefix, so reading the stack from the bottom up to any point gives a viable prefix.
- (A) and (B) are wrong: viable prefixes are not limited to the bottom or the top. The whole stack is one, and so is every part of it from the bottom.
- (D) is wrong: the stack always holds a viable prefix.
Answer: (C)
- (A) and (B) are wrong: viable prefixes are not limited to the bottom or the top. The whole stack is one, and so is every part of it from the bottom.
- (D) is wrong: the stack always holds a viable prefix.
Answer: (C)
Which one of the following is NOT equivalent to ?
Answer: (C)
is true exactly when and have the same value.
- (A) and . So . Equivalent.
- (B) . Equivalent.
- (D) and are both false or both true. Equivalent.
- (C) is true when exactly one of them is true. This is XOR, the negation of . For true and false, is false but (C) is true. Not equivalent.
Answer: (C)
- (A) and . So . Equivalent.
- (B) . Equivalent.
- (D) and are both false or both true. Equivalent.
- (C) is true when exactly one of them is true. This is XOR, the negation of . For true and false, is false but (C) is true. Not equivalent.
Answer: (C)
For a set A, the power set of A is denoted by . If A={5,{6},{7}}, which of the following options are TRUE?
I.
II.
III. {5,{6}}
IV. {5,{6}}
I.
II.
III. {5,{6}}
IV. {5,{6}}
Answer: (C)
Let us check each statement one by one.
- I: , so True
- II: the empty set is a subset of every set True
- III: {5, {6}} A, so it is an element of True
- IV: it would need 5 , but 5 is not a subset of A False
Answer: I, II and III only
- I: , so True
- II: the empty set is a subset of every set True
- III: {5, {6}} A, so it is an element of True
- IV: it would need 5 , but 5 is not a subset of A False
Answer: I, II and III only