MCQs / Computer Science / NSCT: Software Engineering

NSCT: Software Engineering MCQs — Computer Science (page 5)

117 multiple-choice questions on NSCT: Software Engineering from Computer Science, each with the correct answer and, where available, a teacher's explanation. Read through them to revise the chapter, then practise the same questions one by one to test yourself.

101. A module of 5,000 lines of code has 25 known defects. What is its defect density?

  1. 25 defects/KLOC
  2. 5 defects/KLOC
  3. 200 defects/KLOC
  4. 50 defects/KLOC

Answer: B) 5 defects/KLOC

Explanation: 25 ÷ 5 KLOC = 5. Lesson 5.5 · Software Engineering

Discuss this question

102. A control-flow graph has 14 edges and 10 nodes. What is its cyclomatic complexity?

  1. 6
  2. 4
  3. 8
  4. 24

Answer: A) 6

Explanation: V(G) = E − N + 2 = 14 − 10 + 2 = 6. Lesson 5.5 · Software Engineering

Discuss this question

103. A risk has a probability of 0.5 and an impact of Rs. 80,000. What is its risk exposure?

  1. Rs. 80,000
  2. Rs. 160,000
  3. Rs. 50,000
  4. Rs. 40,000

Answer: D) Rs. 40,000

Explanation: Risk exposure = probability × impact. Lesson 5.5 · Software Engineering

Discuss this question

104. A control-flow graph has 12 edges and 9 nodes. What is its cyclomatic complexity?

  1. 3
  2. 5
  3. 21
  4. 7

Answer: B) 5

Explanation: V(G) = E − N + 2 = 12 − 9 + 2 = 5. Lesson 5.5 · Software Engineering

Discuss this question

105. A form accepts a marks from 0 to 100 (inclusive). Using boundary value analysis, which set of test values is best?

  1. 0, 100
  2. 1, 99
  3. -1, 0, 100, 101
  4. 50

Answer: C) -1, 0, 100, 101

Explanation: Test just below, on, and just above each boundary. Lesson 5.5 · Software Engineering

Discuss this question

106. A risk has a probability of 0.3 and an impact of Rs. 200,000. What is its risk exposure?

  1. Rs. 120,000
  2. Rs. 666,666
  3. Rs. 60,000
  4. Rs. 200,000

Answer: C) Rs. 60,000

Explanation: Risk exposure = probability × impact. Lesson 5.5 · Software Engineering

Discuss this question

107. A compiler that passes source code through lexer, parser, optimiser and code generator is an example of:

  1. Peer-to-peer
  2. Blackboard
  3. Microservices
  4. Pipe-and-filter architecture

Answer: D) Pipe-and-filter architecture

Explanation: Data flows through a chain of processing stages. Lesson 5.4 · Software Engineering

Discuss this question

108. The "O" in SOLID stands for the principle that classes should be:

  1. Owned by one developer
  2. Optimised for speed
  3. Object oriented only
  4. Open for extension but closed for modification

Answer: D) Open for extension but closed for modification

Explanation: Add behaviour without changing tested code. Lesson 5.4 · Software Engineering

Discuss this question

109. A valid input range is 1 to 100. Boundary value analysis would test:

  1. Random values
  2. 50 only
  3. 1 and 100 only
  4. 0, 1, 100, 101

Answer: D) 0, 1, 100, 101

Explanation: Errors often occur at the edges. Lesson 5.5 · Software Engineering

Discuss this question

110. Dividing inputs into groups expected to behave the same and testing one value from each is:

  1. Equivalence partitioning
  2. Boundary value analysis
  3. Mutation testing
  4. Path testing

Answer: A) Equivalence partitioning

Explanation: It reduces the number of test cases. Lesson 5.5 · Software Engineering

Discuss this question

111. Testing a website with 10,000 simultaneous users to see if it slows down is:

  1. Regression testing
  2. Usability testing
  3. Unit testing
  4. Load testing

Answer: D) Load testing

Explanation: Stress testing goes beyond normal limits. Lesson 5.5 · Software Engineering

Discuss this question

112. COCOMO is used to estimate:

  1. Database size
  2. Software effort and cost
  3. Screen resolution
  4. Network speed

Answer: B) Software effort and cost

Explanation: It uses lines of code (KLOC). Lesson 5.5 · Software Engineering

Discuss this question

113. A hospital needs safety-critical software with strict documentation and validation at every stage. The most suitable model is:

  1. Big-bang
  2. V-model
  3. Extreme prototyping only
  4. Code-and-fix

Answer: B) V-model

Explanation: The V-model emphasises verification and validation. Lesson 5.1 · Software Engineering

Discuss this question

114. Halfway through a sprint, a stakeholder demands a new urgent feature. In Scrum, the usual response is:

  1. Developers drop current work immediately
  2. The sprint is extended to 8 weeks
  3. The Scrum Master codes it personally
  4. The Product Owner adds it to the product backlog for a future sprint

Answer: D) The Product Owner adds it to the product backlog for a future sprint

Explanation: Sprint scope is protected; the PO decides priorities. Lesson 5.2 · Software Engineering

Discuss this question

115. The correct order of SDLC phases is:

  1. Coding, testing, requirements, design
  2. Design, requirements, testing, coding
  3. Testing, coding, design, deployment
  4. Requirements, design, implementation, testing, deployment, maintenance

Answer: D) Requirements, design, implementation, testing, deployment, maintenance

Explanation: Each phase feeds the next. Lesson 5.1 · Software Engineering

Discuss this question

116. A bar chart showing tasks against time with their start and end dates is a:

  1. Use case diagram
  2. Pie chart
  3. Gantt chart
  4. Histogram of defects

Answer: C) Gantt chart

Explanation: Used for project scheduling. Lesson 5.5 · Software Engineering

Discuss this question

117. A function contains 2 independent decision points (if/while). What is its cyclomatic complexity?

  1. 3
  2. 2
  3. 4
  4. 5

Answer: A) 3

Explanation: V(G) = decisions + 1 = 3. Lesson 5.5 · Software Engineering

Discuss this question

Previous Page 5 of 5

Practise NSCT: Software Engineering MCQs

More Computer Science chapters