Get premium membership and access revision papers, questions with answers as well as video lessons.

Programming Methodology Question Paper

Programming Methodology 

Course:Diploma In Information Technology

Institution: Kca University question papers

Exam Year:2009



UNIVERSITY EXAMINATIONS: 2009/2010
STAGE III EXAMINATION FOR DIPLOMA IN INFORMATION
TECHNOLOGY
DIT 305: PROGRAMMING METHODOLOGY
DATE: DECEMBER 2009 TIME: 1½HOURS
INSTRUCTIONS: Answer any THREE questions
QUESTION ONE [20 Marks]
a) Briefly describe following terms as used in structured programming.
i. Pseudo code
ii. Assembler
iii. Syntax
iv. Source code [4 Marks]
b) The factorial of a number n is defined as n*n (n-1)*(n-2)*…* 1
e.g. the factorial of 3 is 3*2*1= 6. Write a program that prompts
the user for a number then gets its factorial. [10 Marks]
c) Define the following terms as used with functions, giving examples
in each case:
i). Built-in function
ii). User- defined function [4 Marks]
d) State two main reasons why we use comments in a program. [2 Marks]
QUESTION TWO [20 Marks]
a) Define the following terms as used in C programming
i. Semantics
2
ii. Array
iii.Structure [3 Marks]
b) State and explain the three levels of programming languages. [6 Marks]
c) Write a C program that prompts the user to enter four numbers and
then compute both the sum and average of these numbers and
display the result on the screen. [8Marks]
d) Describe briefly the following types of bugs.
i. Syntax error
ii. Semantic error
iii.Run-time error [ 3 Marks]
QUESTION THREE [20 Marks]
a) Briefly describe the three main types of constants [3 Marks]
c) State any three differences between structured programming and
non-procedural programming. [3 Marks]
d) Define the term pointer. [1 Mark]
e) Distinguish between the following functions:
i. Flowchart
ii. Arithmetic Operator [2 Marks]
f) Write a program that captures and displays the following Employee
details: EmployeeNo, Name, Age, Nationality and DoB. [8 Marks]
3
QUESTION FOUR [20 Marks]
a) Define the term Variable. [1 Mark]
b) Write a program that uses the function calc ( ) to calculate both
the area and perimeter a square the function display ( ) to output the
result. [10 Marks]
c) Briefly describe the main types of program control structures. [3 Marks]
d) Differentiate between the following concepts as used in C
programming, giving examples in each case.
i. Interpreter and Function
ii. Integer and String [6 Marks]
QUESTION FIVE [20 Marks]
a) Define following terms as used in structured programming.
i. Local variable
ii. Global Variable
iii. Program
iv. Machine code [4 Marks]
b) State three main characteristics of a good program design. [3 Marks]
c) Using the algorithm below, draw a flow chart that converts the
degrees celcius to degrees farnheit:
1. Prompt the user for the centigrade temperature
2. Store the value in C.
3. Set F to 32+ (9C/5)
4. Print the value of C, F
5. Stop [9 Marks]
d) Briefly describe the four phases in the C programming environment. [4 Marks]






More Question Papers


Popular Exams



Return to Question Papers