UNIVERSITY EXAMINATIONS: 2019/2020
EXAMINATION FOR THE DEGREES OF BACHELOR OF SCIENCE IN IT/
BUSINESS IT/ SOFTWARE DEVELOPMENT/APPLIED COMPUTING/ ISF
BIT 1303A/BBIT 105/BAC 1203/ BSD 1207/ BISF 1203: PROGRAMMING
METHODOLOGY/ INTRODUCTION TO PROGRAMMING
FULLTIME/ PART TIME
SECTION 2: OPEN BOOK EXAMINATIONS
DATE: MAY, 2020 TIME: 6 HOURS
INSTRUCTIONS: Answer ALL Questions
QUESTION ONE [20 MARKS]
a) The following piece of code has 10 errors. Identify which line has an error and state the error.
Any wrong answer will reduce your marks by 1. (10 Marks)
b) Write a program to add two fractions and display the result fraction. Your program will
prompt the user to input fraction 1 and fraction 2. The numerator and denominator of each
fraction are input separately by space (10 Marks)
QUESTION TWO [20 MARKS]
a) Admission to a certain college for engineering program is based on the following conditions;
• Math marks ≥ 80
• Physics marks ≥ 75
• Chemistry marks ≥ 70
• Mean score of the subjects; Math, Physics, and Chemistry ≥ 80
A program is needed that will prompt for the scores of a student in the three subjects and
determine whether the candidate qualifies for the engineering program or not.
i) Create a flowchart to depict the program. (Hint: you can use the app DrawExpress to
draw) (4 Marks)
ii) Write the C program code. (7 Marks)
b) Describe THREE characteristics of third generation programming languages. (3 Marks)
c) Study the following algorithm carefully and write a program in C to implement the design:
(6 Marks)