MENU

Chapter 5 Programming Methodology Solutions

Question - 1 : -
What do you mean by modular approach ?

Answer - 1 : - Breaking of a problem into sub-problems.

Question - 2 : -
Which characteristics of programming methodology refers to the overall readability of the programme ?

Answer - 2 : - Clarity.

Question - 3 : -
Are comments executed ?

Answer - 3 : - Comments are not executed 

Question - 4 : -
Do comments increase execution time ?

Answer - 4 : - No, comments do not increase execution time.

Question - 5 : -
How many types of comments ?

Answer - 5 : - Comments are of two types : single line and multiple line.

Question - 6 : -
Why do we use comments ?

Answer - 6 : - Comments helps the reader to understand the programme easily.

Question - 7 : -
Define Clarity of source code.

Answer - 7 : -

The extent to which inherent language features support source code that is readable and understandable and that clearly reflects the underlying logical structure of the program.

Question - 8 : -
Explain clarity of expression

Answer - 8 : - Clarity refers to the overall readability of the program, with emphasis on program logic. It allows other programmers to follow the program, if the program is written clearly. It also makes the programmer to grasp his or her own program logic even after a long period of time.

Question - 9 : -
Give an example of clarity of expression.

Answer - 9 : -

Suppose we wish to write a program to calculate the area of a circle. We require two variables; radius and area. Instead of writing r and a to represent the radius and area respectively, we use radius and area to represent themselves. It increases the readability of program, Similarly, the constant can be written as pi instead of denoting by p.

Question - 10 : -
Explain types of comments.

Answer - 10 : -

There are two types of comments in a C+ + program; single line comment and multi-‘line comment. Single line comment begin with double slash (/ /) and end in the same line. We can write a program statement and a comment in same line. Whatever written after the / / is ignored by the compiler.

Free - Previous Years Question Papers
Any questions? Ask us!
×