Get premium membership and access revision papers, questions with answers as well as video lessons.
Got a question or eager to learn? Discover limitless learning on WhatsApp now - Start Now!

Programming Methodology Question Paper

Programming Methodology 

Course:Bachelor Of Science In Information Technology

Institution: Kca University question papers

Exam Year:2012



1
UNIVERSITY EXAMINATIONS: 2011/2012
YEAR 1 EXAMINATION FOR THE BACHELOR OF SCIENCE IN
INFORMATION TECHNOLOGY
BIT 1304 PROGRAMMING METHODOLOGY
DATE: APRIL 2012 TIME: 2 HOURS
INSTRUCTIONS: Answer Question One and Any other Two Questions
QUESTION ONE (30 MARKS)
a) Explain the following programming concepts;
i) Function (2 Marks)
ii) Symbolic constant (2 Marks)
iii) Intractable problems (2 Marks)
iv) Pointer (2 Marks)
b) Define the term ‘operator’ and name four types of operators in programming (6 Marks)
c) With appropriate code illustration, differentiate between function definition and function prototype.
(4 Marks)
d) i) Write a program that allows the input of marks for five units and sums these up and
displays both the sum and average (7 Marks)
ii) Amend the above program to apply decision-making in displaying the grade based
on the average mark as follows;
Average Grade
100 – 70 A
69 – 50 B
49 – 40 C
39 – 0 F
(5 Marks)
QUESTION TWO (20 MARKS)
a) Briefly discuss the following types of inputs that must be considered while analyzing algorithms;
i) Best Case Input (2 Marks)
ii) Worst Case Input (2 Marks)
2
iii) Average Case Input (2 Marks)
b) Discuss five properties that an effective algorithm must possess (10 Marks)
c) Discuss any four criteria that can be used to evaluate programming languages (4 Marks)
QUESTION THREE (20 MARKS)
a) i) Define the term ‘variable’ (2 Marks)
ii) Give the syntax of variable declaration in C language (3 Marks)
iii) Explain the importance of data types in variable declaration (2 Marks)
b) Explain the steps in program development (7 Marks)
c) A compiler and an interpreter are two examples of language processors. Compare and contrast the
two (6 Marks)
QUESTION FOUR (20 MARKS)
A program is required to calculate an employee’s net salary from the gross pay. The net salary is given
by gross pay less deductions. Deductions include: 25% of gross pay as tax, KSh.250 as NSSF
contribution and KSh.320 as NHIF contribution.
a) Design a flowchart for the problem. (5 Marks)
b) Implement the above problem using the C program (15 Marks)
QUESTION FIVE (20 MARKS)
a) Illustrate how the values in the following array manipulation statement would be contained within
the computer memory;
int values[10]
values[0] = 197;
values[2] = -100;
values[5] = 350;
values[3] = values[0] + values[5];
values[9] = values[5] / 10;
- -values[2]; (6 Marks)
b) Describe the elements of the following programming approaches;
i) Divide and conquer method of solution
ii) Dynamic programming
(6 Marks)
c) i) Identify any three symbols used in a standard flow-chart diagram (3 Marks)
ii) Explain the features that make C language a preferred programming language. (5 Marks)






More Question Papers


Popular Exams



Return to Question Papers