Software Testing NPTEL Week 3 Assignment

                     

Course Name: Software Testing

Link to Enroll: Click here

These are Answers for Software Testing NPTEL Week 3 Assignment


Q1. Which of the following represents a basic block in a control flow graph?
a. A basic block of statements is a set of all statements that are a part of a function that the control flow graph represents.
b. A basic block of statements is a sequence of statements such that if the first statement the sequence is executed then all the statements in the sequence will also be executed.

Answer: b. A basic block of statements is a sequence of statements such that if the first statement the sequence is executed then all the statements in the sequence will also be executed.


Q2. Consider a variable count of type intint. Suppose there is a method that has a statement of the type count++;count++;. Which of the following statements are correct regarding the data flow definition of countcount?

a. The statement is a definition of countcount.
b. The statement is a use of countcount.
c. The statement is both a definition and use of countcount.
d. The statement is neither a definition nor a use of countcount.

Answer: c. The statement is both a definition and use of countcount.


Q3. Consider a variable xx of type double and suppose a particular method in Java has a statement if(Math.log(x)) >= 4.2, will it be considered a definition of xx or a use of xx?

a. The statement is a definition of xx
b. The statement is a use of xx.

Answer: a. The statement is a definition of xx


These are Answers for Software Testing NPTEL Week 3 Assignment


Q4. State true or false: Consider a variable xx in a program. Not every definition of xx will always reach a use.
a. True.
b. False.

Answer: a. True.


These are Answers for Software Testing NPTEL Week 3 Assignment


Q5. Which of the following best defines a du-path for a variable 

a. A du-path is a simple path from a definition of xx to a use of xx without any further definitions of xx in-between.
b. A du-path is a path from a definition of xx to a use of xx without any further definitions of xx in-between.
c. A du-path is a simple path from a definition of xx to a use of xx without any further uses of xx in-between.
d. A du-path is a path from a definition of xx to a use of xx without any further uses of xx in-between.

Answer: d. A du-path is a path from a definition of xx to a use of xx without any further uses of xx in-between.


Q6. State yes or no: We group du-paths with respect to a variable by their definitions.

a. Yes.
b. No.

Answer: b. No.


These are Answers for Software Testing NPTEL Week 3 Assignment


Q7. Is it true that the all-du-paths data flow coverage criterion subsumes prime path coverage?

a. Yes.
b. No.

Answer: a. Yes.


Q8. Which of the following statements are true when it comes to comparing traditional source code coverage criteria with graph based coverage criteria?

a. Node and statement coverage are the same, edge and branch coverage are the same.
b. Edge and decision coverage are the same.

Answer: b. Edge and decision coverage are the same.


Q9. Which of the following defines a linearly independent path of execution in a control flow graph?
a. A path in which there are no branches.
b. A path which does not contain other paths within it.
c. A path that represents structural complexity of a program.
d. A path within a connected component.

Answer: c. A path that represents structural complexity of a program.


These are Answers for Software Testing NPTEL Week 3 Assignment


Q10. State true or false: Node and edge coverage, as test requirements for structural coverage over graphs, are given with the input graph itself.

a. True.
b. False.

Answer: a. True.


These are Answers for Software Testing NPTEL Week 3 Assignment

All weeks Software Testing: https://progies.in/answers/nptel/software-testing

More Solution of NPTEL: https://progies.in/answers/nptel


* The material and content uploaded on this website are for general information and reference purposes only. Please do it by your own first.


These are Answers for Software Testing NPTEL Week 3 Assignment