DIT305  PROGRAMMING METHODOLOGY.

UNIVERSITY EXAMINATIONS: 2018/2019
EXAMINATION FOR DIPLOMA IN INFORMATION TECHNOLOGY
DIT305 PROGRAMMING METHODOLOGY
MODE: FULL TIME/PART TIME
ORDINARY EXAMINATIONS
DATE: JULY, 2019 TIME: 2 HOURS
INSTRUCTIONS: Answer question ONE and any other TWO.

QUESTION ONE [30 Marks]
a) State and explain the stages of program development lifecycle(PDLC).
6 Marks
b) Name and explain THREE programming errors.
6 Marks
c) Draw and explain FOUR symbols used in a flowchart.
4 Marks
d) Design a program using a flowchart that will guide in calculating the area and perimeter of a
rectangle.
4 Marks
e) Differentiate between ++ and — operator as postfix and prefix
4 Marks
f) With an aid of a C program explain how conditional operators work.
6 Marks
QUESTION TWO [20 Marks]
a) Explain two and two advantages of low level languages.
4 Marks
b) Identifiers in C are user defined words used to name entities like variables, arrays, functions,
structures etc. Explain any FOUR rules used in naming identifiers in C.
4 Marks
c) Data types refer to an extensive system used for declaring variables or functions of different types
before its use. These types can be classified as derived types of primary types. Describe the four
primary types in C highlighting memory size and range of values for each type.
8 Marks
d) Differentiate between symbolic and literal constants in C. Give an example.
4 Marks
QUESTION THREE [20 Marks]
a) Write a C program that asks the user to enter an integer and then the program generates the
multiplication table up to 5.
10 Marks
b) Differentiate between argument and parameter as used in C functions.
4 Marks
c) Write a C program to read a number keyed in by the user to reverse the digits of a given number.
6 Marks
QUESTION FOUR [20 Marks]
a) Programming paradigm refers to basic structuring of thoughts underlying the programming
activity. State and explain FOUR programming paradigms.
8 Marks
b) Describe FOUR lexical elements in a C programming language.
4 Marks
c) Describe any FOUR calculation operators in C programming language
8 Marks
d) Write a program in c to pass an array containing age of a person to a function. The function
should prompt the user to enter age for all persons then find the average age and display the
average age in main function.
8 Marks
QUESTION FIVE [20 Marks]
a) Briefly explain three advantages of modularization in C programing. 3 Marks
b) Explain how developers achieve/implement modularization in C programming. 3 Marks
c) Using switch case selection, write a well commented C program to compute all arithmetic.
operations (+, -, /, *). 8 Marks
Required:
The program should ask the user to select the operation they want to perform where;
1: addition
2: subtraction
3: multiplication
4: exit
Finally, the program should display the results to the user.
d) Explain any two format specifiers used in C programming. 4 Marks
e) Explain the difference between a logical operator and a relational operator. 2 Marks

(Visited 105 times, 1 visits today)
Share this:

Written by