CBSE Class 11 Computer Science Chapter 5: Programming Methodology NCERT Solutions

NCERT Solutions PDF Class 11 PDF

This chapter, "Programming Methodology," for CBSE Class 11 Computer Science, delves into the fundamental concepts of creating efficient and readable programs. It covers the general principles of programming, emphasizing the importance of a structured approach. The solutions explain key characteristics like clarity, indentation, and the role of comments in making code understandable. Students will learn about different types of comments and why they are crucial for maintainability and collaboration. The chapter also introduces the modular approach to problem-solving, breaking down complex tasks into smaller, manageable sub-problems. These NCERT Solutions provide clear explanations and examples, aiding students in grasping these essential programming concepts for their exams and future coding endeavors.

Quick info

BoardCBSE
ClassClass 11
SubjectComputer Science
Session2026
LanguageEnglish
TypeNCERT Solutions
ChapterChapter 5

Chapter summary

Chapter 5 of the CBSE Class 11 Computer Science syllabus focuses on Programming Methodology. This section of NCERT Solutions covers general concepts of programming, including the importance of planning before coding. It elaborates on essential characteristics like clarity and indentation, and explains the purpose and types of comments (single-line and multi-line). The solutions also introduce the modular approach to problem-solving, which involves dividing a larger problem into smaller, more manageable sub-problems. This chapter lays the groundwork for writing well-structured and understandable code.

Learning outcomes

  • Understand the importance of programming methodology.
  • Define and explain the concept of modular programming.
  • Identify and explain the characteristics of good programming, such as clarity and indentation.
  • Recognize the purpose and types of comments in programming.
  • Apply the concept of clarity in writing source code.
  • Understand why comments do not affect program execution time.

Topics covered

Paper topics

  • Programming Methodology
  • General Concepts of Programming
  • Modular Approach
  • Clarity of Source Code
  • Clarity of Expression
  • Indentation
  • Comments
  • Types of Comments
  • Single-line Comments
  • Multi-line Comments
  • Readability of Code
  • Program Understanding

Important topics

  • Modular Approach
  • Clarity in Programming
  • Purpose and Types of Comments
  • Importance of Indentation
  • General Programming Concepts

PDF preview

Read page by page below. PDF is streamed from the official NCERT website — no download button on this page.

Loading document …
Page of
Loading page …

Questions and Solutions

Question 1

On which step programming methodology is used?
Solution: Programming methodology is primarily used before writing the program. It involves planning, designing, and structuring the approach to solve a problem before starting the actual coding process.

Question 2

What do you mean by the modular approach in programming?
Solution: The modular approach means breaking down a large, complex problem into smaller, independent sub-problems. Each sub-problem can be solved separately, and then these solutions can be combined to solve the overall problem. This makes the development process more manageable and the code easier to understand and maintain.

Question 3

Which characteristic of programming methodology refers to the overall readability of the program?
Solution: The characteristic that refers to the overall readability of the program is Clarity. A clear program is easy to understand, follow, and debug, both for the original programmer and for others.

Question 4

Are comments executed by the computer during program run?
Solution: No, comments are not executed. They are ignored by the compiler or interpreter and serve only as explanatory notes for humans reading the code.

Question 5

Do comments increase the execution time of a program?
Solution: No, comments do not increase the execution time of a program. Since they are ignored by the compiler, they do not add any overhead to the program's processing.

Question 6

How many types of comments are generally recognized in programming?
Solution: Comments are generally of two main types: single-line comments and multiple-line (or block) comments. Single-line comments typically span one line, while multi-line comments can span across several lines.

Question 7

Why do we use comments in programming?
Solution: We use comments in programming primarily to help readers understand the program easily. They can explain complex logic, clarify the purpose of certain code sections, or provide context, making the code more maintainable and collaborative.

Question 8

Which characteristic of programming methodology refers to the insertion of extra blank spaces or indentation before declarations or at the beginning of lines?
Solution: The characteristic that refers to the insertion of extra blank spaces or indentation before declarations or at the beginning of lines is called Indentation. Proper indentation visually structures the code, making it easier to read and understand the program's logic and hierarchy.

Question 1

Define Clarity of source code.
Solution: Clarity of source code refers to the extent to which the inherent features of a programming language support writing code that is easily readable and understandable. It means the code clearly reflects the underlying logical structure of the program, making it comprehensible to other programmers and the original author over time.

Question 2

Explain clarity of expression in programming.
Solution: Clarity of expression in programming emphasizes the overall readability and understandability of the program's logic. When a program is written with clarity of expression, other programmers can easily follow its flow and logic. It also helps the original programmer recall and grasp their own program logic even after a significant period has passed since writing it.

Question 3

Give an example illustrating clarity of expression in programming.
Solution: For example, suppose we need to write a program to calculate the area of a circle. Instead of using short, ambiguous variable names like 'r' for radius and 'a' for area, it is better to use descriptive names such as radius and area. Similarly, a constant like pi should be named pi rather than a single letter like 'p'. Using such meaningful names significantly increases the readability and clarity of the program.

Question 4

Explain the different types of comments used in programming.
Solution: In programming languages like C++, there are typically two types of comments: single-line comments and multi-line comments.
  • Single-line comments begin with a double slash (//). Anything written on the same line after // is considered a comment and is ignored by the compiler. You can write a program statement and a comment on the same line.
  • Multi-line comments (also known as block comments) are enclosed within /* and */. They can span across multiple lines, allowing for more extensive explanations.

Question 5

Write any two characteristics of comments in programming.
Solution: Two important characteristics of comments are:
  1. Ignored by Compiler: Comments are not processed or executed by the compiler or interpreter. They are solely for human understanding.
  2. Enhance Readability: Comments help explain the code's logic, purpose, and functionality, making it easier for programmers to read, understand, and maintain the program over time.

Common mistakes

  • Confusing comments with executable code.
  • Not understanding the purpose of indentation for readability.
  • Using unclear variable names instead of descriptive ones.
  • Overlooking the benefits of breaking down problems into modules.

Revision tips

  • Focus on understanding the 'why' behind each programming methodology concept.
  • Practice identifying clarity and indentation in sample code snippets.
  • Review the different types of comments and when to use them.
  • Think about how to break down simple problems into smaller sub-problems.
  • Ensure you can explain the difference between single-line and multi-line comments.

Practice MCQs

Q1. At which stage is programming methodology primarily applied?

Q2. What is the primary benefit of the modular approach in programming?

Q3. Which characteristic of programming methodology refers to how easily a program can be read and understood?

Q4. What is the effect of comments on program execution?

Q5. Which type of comment starts with // in C++?

Frequently asked questions

What is programming methodology?

Programming methodology refers to the systematic approach and principles followed before and during the process of writing a computer program to ensure it is efficient, readable, and maintainable.

Why is clarity important in programming?

Clarity is crucial because it makes the source code easy to read and understand, both for the original programmer and for others who might work on the code later. It helps in debugging and future modifications.

What is the modular approach?

The modular approach is a problem-solving technique where a large, complex problem is broken down into smaller, independent, and more manageable sub-problems or modules.

Do comments affect how fast a program runs?

No, comments do not affect a program's execution time because they are ignored by the compiler and are intended solely for human readers to understand the code.

What are the two main types of comments?

The two main types of comments are single-line comments, which typically start with //, and multi-line comments, which are enclosed within /* and */.

What does indentation mean in programming?

Indentation refers to the use of extra blank spaces or tabs at the beginning of lines of code to visually structure the program, making its logical flow easier to follow.

Content reviewed by the NCERT Help team. Editorial Team and update policy

NCERT Solutions PDF PDF on NCERT Help. URL unchanged for search indexing.