Week 8
Week 8
(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)
How does an
NPTEL online
Assignment submitted on 2024-09-18, 15:41 IST
course work? () 1) Which of the following is a correct regular expression for the language of all binary words (over the alphabet 1 point
{0, 1}) that begin with a 0 and end with a 1?
Week 0 ()
0 + (0 + 1)∗ + 1
Week 1 ()
0 ⋅ (0 ⋅ 1)∗ ⋅ 1
Week 2 ()
0 ⋅ (0 + 1)∗ ⋅ 1
Week 3 ()
(0 ⋅ (0 + 1)∗ ⋅ 1)∗
Week 4 () Yes, the answer is correct.
Score: 1
Week 5 () Accepted Answers:
0 ⋅ (0 + 1)∗ ⋅ 1
Week 6 ()
2) Suppose a programming language has identifier names from the lower case English alphabet that can be 1 point
Week 7 () exactly of length three. Which of the following is a regular expression that corresponds to these identifier names?
Mutation Testing: 3) Which are the three levels in which the syntax of a programming language is typically given? 1 point
Mutation Operators
for Source Code Characters, tokens, words and phrases.
(unit? Words, phrases and context that specifies types, variable references etc.
unit=66&lesson=70)
Regular expressions and context-free languages.
Mutation Testing Vs. Regular expressions and context-free grammars.
Graphs and Logic
Based Testing (unit? No, the answer is incorrect.
unit=66&lesson=71)
https://onlinecourses.nptel.ac.in/noc24_cs91/unit?unit=66&assessment=220 1/3
10/21/24, 2:57 PM Software Testing - - Unit 11 - Week 8
Score: 0
Practice: Week 8 :
Assignment 8 (Non Accepted Answers:
Graded) Words, phrases and context that specifies types, variable references etc.
(assessment?
4) State true or false: If a mutant is strongly killed, it is also weakly killed. 1 point
name=212)
Text Transcripts () For the next five questions, consider the code snippet below and the mutation given in line 4. Answer the following with
reference to mutation testing of the code snippet below.
Live sessions ()
1 public static int findVal(int array_num[], int Val)
Books () 2 {
3 int findVal = -1;
4 for (i=0; i < array_num.length; i++)
4 for (i=1; i < array_num.length; i++)
5 if (array_num[i] == Val)
6 findVal = i;
7. return (findVal);
8. }
6) Identify the mutation operator that is applied at statement 4 in the above code snippet. 1 point
Yes.
No.
8) State Yes or No: Is it possible that infection of the mutation occurs when the input array is the empty array? 1 point
Yes.
No.
https://onlinecourses.nptel.ac.in/noc24_cs91/unit?unit=66&assessment=220 2/3
10/21/24, 2:57 PM Software Testing - - Unit 11 - Week 8
Score: 1
Accepted Answers:
No.
9) Which of the following test cases ensures that the mutated statement is infected but propagation does not 1 point
occur?
A test case with the value not in the array will ensure that infection occurs and propagation does not occur.
A test case in which the last occurrence of the value is not in array num[0] will ensure infection and not propagation.
A test case in which the element occurs exactly once in the array will ensure that infection occurs and propagation
does not occur.
A test case in which the last occurrence of the value is anywhere except in the first position will ensure that infection
occurs and propagation does not occur.
10) Which of the following test cases will strongly kill the mutant? 1 point
A test case in which the value is not in the array will strongly kill the mutant.
A test case in which the value occurs exactly once at any position in the array will strongly kill the mutant.
A test case in which the value is in the first position of the array will strongly kill the mutant.
A test case in which the value is not in the first position of the array will strongly kill the mutant.
https://onlinecourses.nptel.ac.in/noc24_cs91/unit?unit=66&assessment=220 3/3