Q. 1.
Problem Definition
20
04 (Comprehension)
In this question theory on problem definition will be asked. It is same as the discussion we used to
have in the class after reading the question for understanding the question. The complete
programming theory in Appendix A of this document. Relevant problem definition theory may be
referred from that.
03 (Knowledge)
In this question explanation on some library functions may be asked. You may be asked to explain
about three / six library functions. The Theory Notes booklet contains the necessary information
about these library functions at two places. In the Functions chapter in tabular format and right at
the end of the booklet in slightly more descriptive form. I have tried to include all those library
function which have been asked in the past and some more. I sincerely hope nothing is asked which
is out of this collection.
03 (Comprehension)
In this question a Theory Note on iteration may be asked. (Explanation of any of the looping structure may be
asked. You can refer to the Theory Notes booklet for the same.) It is also possible that a program based on
iteration may be given and you will be asked to either give the output or find out number of iteration of the
body of the loop. We have done such questions in the class and you may find then in the Question Set.
04 (Comprehension)
In this question either Theory question on functions or program output question on functions may be asked.
Another favorite question of MU examiners is Compare Formal parameters and Actual parameters. Answer
of this question in tabular form is given in Appendix B of this document.
Strings
03 (Application)
In this question, a small program on strings may be asked. Program for Reversal, Palindrome, String
length, Concatenation etc. all of which we have done in the class.
Pointers
03 (Comprehension)
This is the only question in the paper on the topic of pointers. It cannot be a programming question.
Either an explanation of address(&) and dereferencing operator(*) will be asked or an output
question on pointers will be asked.
Q. 2.
Scalar Data types, Scope and Lifetime, type conversion
20
05 (Comprehension)
In this question, a note on storage classes can be asked. Even though it is there in Theory Notes booklet, for
ready reference you can refer to Appendix C of this document for the same. This question may contain theory
about different data types for which you can refer to the Theory Notes booklet.
05 (Application)
This question may carry a programming question on functions. We have done many such questions in the
class.
Structures
10 (Application)
This question may carry a programming question on structures. We have done many such questions in the
class. This question is the only programming question having 10 marks. If you do all the programming
questions in the Question Set from Structures (only 5 in number) I think you should be able to answer this
question.
Q. 3.
Developing Algorithms
20
06 (Application)
06 (Application)
08 (Application)
This question, i.e. Q No 3 is a completely programming question. One algorithm question, One program on
looping and one on recursive function. We have done all these concepts by taking numerous programming
examples. Please revise the same. The difference between recursion and iteration in tabular format is given in
Appendix D of this document.
Q. 4.
Developing Algorithms
20
06 (Application)
06 (Application)
08 (Application)
Just like above question, this Q No 4 is also a completely programming question. One algorithm
question, One program on conditional statements looping and one on arrays. We have done all these concepts
by taking numerous programming examples. Please revise the same.
Q. 5.
Expressions in C; Arithmetic and Boolean expressions
20
06 (Knowledge)
This question will contain some simple questions like Expression Evaluation, Operator precedence, identifier
acceptability etc
06 (Application)
08 (Application)
In this question, a program about array will be asked. If Q No 4 array question is about 1D array, then this may
be about 2D array or it may be the other way round.
Q. 6.
Control Structures for selection
20
06 (Comprehension)
In this question, theory notes on if-else ladder and switch-case, difference between if and if-else etc. may
be asked. It is also possible that this question may ask output of a program with conditional statements.
06 (Application)
Strings
05 (Application)
Files
03 (Comprehension)
This is the only question on files. If the theory on files from the Theory Notes booklet is done properly, one
should be able to answer this question.
APPENDIX A
Programming Fundamentals
What is programming?
When we want a computer to perform a specific task, such as generating a marks sheet or a
salary slip, we have to create a sequence of instructions in a logical order that a computer
can understand and interpret. This sequence of instructions is called a program. The
process of writing programs is called programming.
The task of programming involves a lot of effort and careful planning. Without this, the
computer will produce erroneous results. The following steps should go into the planning of
program:
2.
Once we know these, we can figure out how to develop the solution.
Deciding on input
Suppose we want to write a program to work out the total and average of a students marks
in five subjects, we would need to mention the marks in the five subjects as input.
Deciding on output
Next, we have to think of the output the elements that should be displayed and those
that should not. In the marks example, since the task is to prepare a marks sheet, the
marks in all the five subjects, their total and average should be displayed on the screen.
Developing a solution logically
Once we have defined and analyzed the problem decided on the output and the input
we can go on to develop the solution.
The most important aspect of developing the solution is developing the logic to solve the
problem. This requires creating a set of step-by-step instructions and/or rules called an
algorithm. Each step performs a particular task. We can write these steps in plain English..
The algorithm for the example on finding total marks and average would look like this:
1.
2.
3.
4.
Assign grade.
5.
6.
End.
For any computer program to work well, it has to be written properly. Formulating an
effective algorithm will make writing an effective program easier. For an algorithm to be
effective, it has to have the following characteristics:
1.
2. Definiteness: Each step of the algorithm should be defined precisely. There should be
no ambiguity.
3. Effectiveness: All the operations in the algorithm should be basic and be performed
within the time limit.
4. Input: An algorithm should have certain inputs.
5. Output: An algorithm should yield one or more outputs that are the result of
operations performed on the given input.
The famous mathematician, D.E. Knuth, first expressed these characteristics.
Programming: The next step after developing an algorithm
Once we develop the algorithm, we need to convert it into a computer program using a
programming language (a language used to develop computer programs). A programming
language is entirely different from the language we speak or write. However, it also has a
fixed set of words and rules (syntax or grammar) that are used to write instructions for a
computer to follow.
APPENDIX B
Formal Parameters
Parameters appear in function definitions.
A parameter is a type.
A function is defined in terms of parameters.
When discussing the code inside the subroutine
definition, the variables in the subroutine's
parameter list are the parameters.
APPENDIX C
Storage Classes
C storage class specifiers determines the physical location in memory within the computer where
the variable declared in c would be actually stored.
Storage class specifiers also determines
increment();
increment();
return 0;
}
Output
1
2
3
Output
i=0
On increment, i=1
On increment, i=2
On decrement, i=1
On decrement, i=0
APPENDIX D
Recursion
Recursion is the term given to the mechanism
of defining a set or procedure in terms of itself.
A conditional statement is required in the body
of the function for stopping the function
execution.
At some places, use of recursion generates
extra overhead. Hence, better to skip when
easy solution is available with iteration.
Recursion is expensive in terms of speed and
memory.
Factorial Example using recursion.
Iteration
The block of statement executed repeatedly
using loops.
The iteration control statement itself contains
statement for stopping the iteration. At every
execution, the condition is checked.
All problems can be solved with iteration.