0% found this document useful (0 votes)
18 views6 pages

Assignment 2 NPTEL CS-308

This document contains a series of multiple-choice questions related to software documentation and testing, specifically focusing on Natural Docs and various testing methodologies. Each question provides five options, with the correct answers indicated. Key topics include the importance of code documentation, types of testing, and tools used in software development.

Uploaded by

karthi231206
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views6 pages

Assignment 2 NPTEL CS-308

This document contains a series of multiple-choice questions related to software documentation and testing, specifically focusing on Natural Docs and various testing methodologies. Each question provides five options, with the correct answers indicated. Key topics include the importance of code documentation, types of testing, and tools used in software development.

Uploaded by

karthi231206
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Assignment - 2

CS-308 (Large Applications Practicum)

Instructions:
● Each question has five options, with one correct answer.
● Choose the most appropriate answer.

1. Why is code documentation important in large applications?

a) It makes the code run faster

b) It helps programmers understand and maintain the code

c) It increases the file size unnecessarily

d) It prevents the code from being executed

e) None of these

Answer: b) It helps programmers understand and maintain the code

2. What is the primary function of Natural Docs?

a) To write test cases for code

b) To automatically generate documentation from source code

c) To debug the program efficiently

d) To optimize the code execution

e) None of these

Answer: b) To automatically generate documentation from source code

3. Which of the following is NOT a keyword used in Natural Docs for documentation?

a) Function

b) Class

c) Variable

d) Execute
e) None of these

Answer: d) Execute

4. What is required to use Natural Docs on a system?

a) Java Development Kit (JDK)

b) Perl

c) Python

d) Eclipse

e) None of these

Answer: b) Perl

5. In Natural Docs, what symbol is used for linking documentation topics?

a) Square brackets []

b) Angle brackets <>

c) Curly braces {}

d) Parentheses ()

e) None of these

Answer: b) Angle brackets <>

6. What type of documentation does Natural Docs NOT generate?

a) HTML

b) PDF

c) Text files

d) Markdown

e) None of these

Answer: b) PDF

7. How can images be added in Natural Docs?

a) Using <img> HTML tag

b) By writing (see filename)


c) By using a separate image annotation file

d) By embedding them in source code

e) None of these

Answer: b) By writing (see filename)

8. What is the purpose of “Freestanding Topics” in Natural Docs?

a) To document external libraries

b) To include information that does not belong to a specific code element

c) To create executable scripts

d) To store logs of program execution

e) None of these

Answer: b) To include information that does not belong to a specific code element

9. What is the purpose of “Definition Lists” in Natural Docs?

a) To store function call traces

b) To define multiple items concisely within documentation

c) To create executable scripts

d) To track memory usage

e) None of these

Answer: b) To define multiple items concisely within documentation

10. What is a key advantage of using Natural Docs over manually written documentation?

a) It eliminates the need for comments in the source code

b) It ensures documentation stays in sync with code changes

c) It executes code faster

d) It allows code to be compiled in multiple languages

e) None of these

Answer: b) It ensures documentation stays in sync with code changes​


11. Which of the following best defines software testing?

a) Ensuring the software is completely free from bugs

b) Investigating the quality and performance of software

c) Writing new code to replace outdated software

d) Increasing the complexity of a program

e) None of these

Answer: b) Investigating the quality and performance of software

12. What is the main goal of verification in software testing?

a) Checking if the right software was built

b) Ensuring that the software meets the specified requirements

c) Debugging runtime errors

d) Fixing syntax errors

e) None of these

Answer: b) Ensuring that the software meets the specified requirements

13. Which type of testing is performed without executing the program?

a) Dynamic testing

b) Static testing

c) Black-box testing

d) Mutation testing

e) None of these

Answer: b) Static testing

14. Which of the following is an example of white-box testing?

a) Boundary value analysis

b) Unit testing

c) User acceptance testing

d) Exploratory testing
e) None of these

Answer: b) Unit testing

15. Which testing method does NOT require knowledge of the internal code structure?

a) White-box testing

b) Black-box testing

c) Mutation testing

d) Integration testing

e) None of these

Answer: b) Black-box testing

16. What is the primary purpose of regression testing?

a) To check if the system meets business requirements

b) To verify changes in the code do not break existing functionality

c) To test individual components in isolation

d) To detect memory leaks in the program

e) None of these

Answer: b) To verify changes in the code do not break existing functionality

17. Which of the following is a popular unit testing framework for Java?

a) JUnit

b) Selenium

c) PyTest

d) LoadRunner

e) None of these

Answer: a) JUnit

18. Which tool is commonly used for checking code coverage in Java applications?

a) Selenium

b) JUnit
c) Emma (EclEmma)

d) Jenkins

e) None of these

Answer: c) Emma (EclEmma)

19. What does code coverage measure?

a) The number of test cases written for a project

b) The amount of code executed during testing

c) The time taken to execute test cases

d) The total number of software defects found

e) None of these

Answer: b) The amount of code executed during testing

20. In mutation testing, what is introduced to check the effectiveness of test cases?

a) Syntax errors

b) Intentional small changes (mutants) in the source code

c) Additional debugging information

d) Extra documentation

e) None of these

Answer: b) Intentional small changes (mutants) in the source code

You might also like