AMP

Chapter 7: Composition and Decomposition — Online MCQ Test

COMPUTER SCIENCE · CLASS 11th · Tamil Nadu State Board
Practice Chapter 7: Composition and Decomposition with a free chapter-wise online MCQ test. This chapter covers: This chapter covers structural algorithm design including sequential conditional and iterative statements. Students learn to decompose complex problems into smaller manageable sub-.... AI-generated questions from basic to board-exam level, with instant results and explanations.

Start Exam on Full Site →

Chapter 7: Composition and Decomposition — Important Questions & Answers

Which of the following is the process of breaking a complex problem into smaller, manageable sub-problems?
  • A. Composition
  • B. Decomposition
  • C. Iteration
  • D. Abstraction
Answer: B. Decomposition
Decomposition is the design technique of splitting a large problem into smaller parts that are easier to solve.
What is the primary purpose of algorithmic composition?
  • A. To increase the number of bugs
  • B. To combine smaller components to build a larger system
  • C. To delete variables from memory
  • D. To avoid using functions
Answer: B. To combine smaller components to build a larger system
Composition involves assembling smaller, pre-built components or modules to form a complex program solution.
When designing a large software system, why is decomposition preferred over writing a single long function?
  • A. It makes the code harder to understand
  • B. It makes testing and maintenance more efficient
  • C. It reduces the computer's processing speed
  • D. It prevents the use of variables
Answer: B. It makes testing and maintenance more efficient
Decomposition allows developers to isolate components for testing and updating without affecting the entire system.
In a layered architecture, a high-level module depends on low-level modules. This is an application of:
  • A. Composition
  • B. Hardware limitation
  • C. Sequential processing only
  • D. Single-block programming
Answer: A. Composition
Composition allows complex behaviors to be built by layering modular components that handle specific logic.
In the design of a sorting algorithm, breaking it into 'compare', 'swap', and 'iterate' modules represents:
  • A. Algorithmic decomposition where the sub-problems mirror logic operations
  • B. A failure in algorithm design
  • C. Composition without logic
  • D. A hardware-specific solution
Answer: A. Algorithmic decomposition where the sub-problems mirror logic operations
This is a classic example of logical decomposition, identifying distinct steps of an algorithm to handle as separate modules.