Software Maintenance & Evolution MCQs for NSCT

By the NSCT Exam Editorial Team · Updated 2026-11-24 · Facts checked against official sources on 2026-11-24

Software maintenance is any change made to software after it has been delivered, whether to fix faults, adapt it to a new environment or improve it. Software evolution is the long-term pattern of those changes, described by Lehman's laws. It is topic 11 of the Software Engineering area, which carries 10% of the NSCT according to HEC's Areas of Competencies. The area's 2026 average was 50.1% accuracy, per the HEC NSCT report and APP.

Maintenance usually costs more than the original development over a system's life, because useful systems stay in service for years. That is why exam questions focus on classifying changes and reasoning about their cost.

Maintenance types

ISO/IEC 14764, summarised in SWEBOK, defines four types and groups them into two classes.

Type Trigger Example Class
Corrective A failure has been discovered Fix a crash a user reported Correction
Preventive A latent fault is found before it fails Fix a date overflow spotted in review Correction
Adaptive The environment changes Update the app for a new OS or database version Enhancement
Perfective Users want improvements Add a report, speed up a query, improve maintainability Enhancement

ISO/IEC 14764 also defines emergency maintenance: an unscheduled, temporary fix that keeps a system running until proper corrective maintenance is done.

Textbooks label these differently. Sommerville uses fault repair, environmental adaptation and functionality addition. Pressman and many lecture notes call restructuring for future maintainability "preventive", whereas SWEBOK places "improving maintainability" under perfective. In exams, follow the question's wording: a latent fault fixed before failure is preventive in every source.

Studies since Lientz and Swanson consistently find that enhancement (adaptive plus perfective) takes most maintenance effort, not bug fixing.

Exam angle: ask "did anything fail?" first. If yes, it is corrective; if a fault was found before failing, preventive; if the environment changed, adaptive; otherwise perfective.

Software evolution and Lehman's laws

Lehman classified programs as S-type (fully defined by a formal specification), P-type (a precise problem with an approximate solution, such as playing chess) and E-type (embedded in a real-world environment). His eight laws describe E-type systems:

  1. Continuing change: a system must keep adapting, or it becomes progressively less satisfactory.
  2. Increasing complexity: structure degrades with change unless work is done to reduce it.
  3. Self-regulation: evolution follows statistically regular trends.
  4. Conservation of organisational stability: the effective work rate stays roughly constant over a system's life.
  5. Conservation of familiarity: the change in each release stays roughly constant.
  6. Continuing growth: functionality must keep growing to keep users satisfied.
  7. Declining quality: quality appears to decline unless the system is actively maintained.
  8. Feedback system: evolution is a multi-loop, multi-agent feedback process.

Exam angle: "a huge release after several small ones" points to conservation of familiarity; "complexity rising while features stay flat" points to increasing complexity.

Legacy systems

A legacy system is an older system, often built with obsolete languages or platforms, that is still critical to the business. Its business rules are often buried in undocumented code. Sommerville assesses each one on business value and system quality:

Low quality High quality
High value Re-engineer, or replace if a suitable system exists Continue normal maintenance
Low value Scrap Replace with an off-the-shelf system, scrap, or keep maintaining

Exam angle: high value with low quality is the classic re-engineering candidate.

Re-engineering

Chikofsky and Cross define the key terms:

Pressman's re-engineering model is a cycle: inventory analysis, document restructuring, reverse engineering, code restructuring, data restructuring and forward engineering. Data re-engineering cleans and migrates data, such as moving flat files into a relational database.

For cost estimates, Boehm's COCOMO uses annual change traffic (ACT) = (KLOC added + KLOC modified) / total KLOC. Annual maintenance effort = ACT x development effort.

Exam angle: if nothing is changed, it is reverse engineering; if the form changes, it is re-engineering.

Common traps

Worked examples

1. Understanding. How does reverse engineering differ from re-engineering? Answer: reverse engineering only examines a system and recovers designs. Re-engineering uses that understanding to alter the system and implement it in a new form.

2. Application. An 80 KLOC system took 400 person-months (PM) to build. Each year 6 KLOC are added and 2 KLOC are modified. Estimate the annual maintenance effort. Answer: 40 PM. ACT = (6 + 2) / 80 = 0.10, and 0.10 x 400 = 40 PM a year.

3. Analysis. Re-engineering would cost 240 PM and save 40 PM a year. The system will be retired in 4 years. Should the team re-engineer it? Answer: not on cost grounds. Break-even is 240 / 40 = 6 years, which is longer than the system's remaining life. Normal maintenance, or a cheaper partial restructuring, makes more sense.

Practise

The quiz below has 99 Software Maintenance & Evolution questions, filterable by tier and difficulty.

Practise: 99 questions

Interactive quiz loading. The first 10 questions are shown below.

  1. A user reports that the app crashes when a form is submitted empty, and the team fixes it. Which type of maintenance is this?

    1. Adaptive
    2. Perfective
    3. Preventive
    4. Corrective
    Show answer

    Answer: D. Corrective

    Corrective maintenance is the reactive modification of software after delivery to correct problems that have been discovered, as defined in ISO/IEC 14764. A crash reported by a user is a discovered failure, so fixing it is corrective.

  2. Changing a system so that it keeps working after the company moves to a new operating system version is:

    1. Corrective maintenance
    2. Perfective maintenance
    3. Adaptive maintenance
    4. Preventive maintenance
    Show answer

    Answer: C. Adaptive maintenance

    Adaptive maintenance keeps a software product usable in a changed or changing environment, such as a new operating system, database version, hardware or external interface. Nothing was broken in the software itself; the environment changed around it. Sommerville calls this environmental adaptation.

  3. Improving a working report so that it runs twice as fast, at users' request, is mainly which type of maintenance?

    1. Perfective
    2. Corrective
    3. Adaptive
    4. Preventive
    Show answer

    Answer: A. Perfective

    Perfective maintenance provides enhancements for users and improves attributes such as performance or maintainability. The report was not failing and the environment did not change, so speeding it up is perfective.

  4. During a code review, a developer notices a date counter that will overflow in 2038 and fixes it before any user is affected. Under ISO/IEC 14764 this is:

    1. Corrective maintenance
    2. Preventive maintenance
    3. Adaptive maintenance
    4. Perfective maintenance
    Show answer

    Answer: B. Preventive maintenance

    Preventive maintenance detects and corrects latent faults before they become operational failures. The overflow has not caused a failure yet, so the fix is preventive. Fixing it after users had seen wrong dates would have been corrective.

  5. Which description best fits a legacy system?

    1. Any system that has been released to customers
    2. A prototype that was thrown away after requirements were clear
    3. An older system, often built with obsolete technology, that is still critical to the business
    4. A new system written in a legacy-free language
    Show answer

    Answer: C. An older system, often built with obsolete technology, that is still critical to the business

    Sommerville describes legacy systems as older systems that rely on languages and technology no longer used for new development, yet remain essential to the business. Replacing them is risky because business rules are buried in the code and documentation is often missing.

  6. ISO/IEC 14764 groups the four maintenance types into two classes. Which grouping is correct?

    1. Correction: corrective and preventive; Enhancement: adaptive and perfective
    2. Correction: corrective and adaptive; Enhancement: perfective and preventive
    3. Correction: corrective only; Enhancement: adaptive, perfective and preventive
    4. Correction: preventive and perfective; Enhancement: corrective and adaptive
    Show answer

    Answer: A. Correction: corrective and preventive; Enhancement: adaptive and perfective

    ISO/IEC 14764, also summarised in SWEBOK, puts corrective and preventive maintenance under correction, because both deal with faults (found or latent). Adaptive and perfective maintenance form enhancement, because both change the software to meet new needs or environments.

  7. Lehman's first law, continuing change, states that an E-type system:

    1. Must be continually adapted, or it becomes progressively less satisfactory
    2. Becomes simpler with every release
    3. Can be frozen once it meets its original specification
    4. Grows only when new developers join the team
    Show answer

    Answer: A. Must be continually adapted, or it becomes progressively less satisfactory

    Lehman's law of continuing change says a program used in a real-world environment must keep changing, because the environment changes. If it is not adapted, it becomes progressively less useful. This is why maintenance is unavoidable for real systems.

  8. According to Lehman's law of increasing complexity, what happens as an evolving system is changed?

    1. Complexity stays constant because each change is local
    2. Complexity falls because developers learn the code
    3. Complexity rises only when the programming language changes
    4. Its structure tends to degrade and complexity rises, unless work is done to maintain or reduce it
    Show answer

    Answer: D. Its structure tends to degrade and complexity rises, unless work is done to maintain or reduce it

    Each change tends to add special cases and erode the original structure. Lehman's second law says complexity increases unless extra effort, such as refactoring and restructuring, is spent to control it. That effort does not add features, so it is often skipped, which makes later changes costlier.

  9. Lehman's laws of software evolution are formulated mainly for which kind of program in his S, P and E classification?

    1. S-type programs, which are fully defined by a formal specification
    2. P-type programs, which solve a precisely stated problem such as chess
    3. All three types equally, with no difference
    4. E-type programs, which are embedded in and interact with a real-world environment
    Show answer

    Answer: D. E-type programs, which are embedded in and interact with a real-world environment

    Lehman classified programs as S-type (formally specified, correct or not against the spec), P-type (practical problems whose solutions approximate reality) and E-type (part of a real-world environment they also change). The evolution laws describe E-type systems, such as banking or hospital software.

  10. Which Lehman law says that, over a system's lifetime, the amount of change in each release stays roughly constant?

    1. Continuing growth
    2. Conservation of familiarity
    3. Self-regulation
    4. Declining quality
    Show answer

    Answer: B. Conservation of familiarity

    The law of conservation of familiarity says the incremental change in each release is approximately constant, because everyone involved must keep understanding the system. Very large releases tend to bring many faults and are often followed by a smaller, corrective release.

FAQs

What is the difference between maintenance and evolution?

Maintenance means the individual changes made after delivery: fixes, adaptations and enhancements. Evolution is the long-term view of how a system changes across many releases, and the forces behind it. Lehman's laws describe evolution; ISO/IEC 14764 classifies maintenance. Sommerville treats evolution as the stage where major changes are still made, and servicing as the later stage of small fixes only.

Is refactoring a type of maintenance?

Yes. Refactoring improves internal structure without changing behaviour. SWEBOK counts improving maintainability as perfective maintenance, while Pressman and many courses call it preventive, because it heads off future problems. Name the type the question's definition points to. Refactoring during development is also covered under implementation and coding.

Why are legacy systems not simply replaced?

Replacement is costly and risky. Legacy systems hold years of business rules that are often undocumented, and a big-bang switch can stop the business if anything is missed. Many organisations therefore re-engineer or replace them piece by piece while the old system keeps running.

How does change control relate to maintenance?

Every maintenance change should go through a change request, impact analysis, approval and a new baseline. That process belongs to software configuration management, and it keeps maintenance changes traceable and reversible.

Next step

Continue with Software Quality Assurance MCQs, return to the Software Engineering MCQ hub, or test yourself in an NSCT mock test.