DBIT303  COMPUTER PROGRAMMING CONCEPTS.

UNIVERSITY EXAMINATIONS: 2018/2019
EXAMINATION FOR THE DIPLOMA IN BUSINESS INFORMATION
TECHNOLOGY
DBIT303 COMPUTER PROGRAMMING CONCEPTS
DATE: AUGUST, 2019 TIME: 2 HOURS
INSTRUCTIONS: Answer question One and ANY other two questions.

QUESTION ONE [20 MARKS]
(a) Outline three merits of structured programming [3 Marks]
(b) Outline four rules followed when choosing the characters that make up a valid C
identifier [4 Marks]
(c) Discuss four factors to consider while selecting a computer programming language
[4 Marks]
(d) Outline two benefits and one limitation of pseudocode [3 Marks]
(e) Consider the following code:
Int a(int b){int c,d=0;for(c=10;c>b;c–)d+1;return(d);}
Required:
(ii) Rewrite the above code by applying C programming format [6 Marks]
(iii)Write down the following from (1e) above:-
(i) Identifier [2 Marks]
(ii) Constants [2 Marks]
(iii)A conditional expression (logical/ Boolean) [2 Marks]
(iv)An iterative statement (repetitive/ loop) [2 Marks]
(v) Reapeted statement in the loop [2 Marks]
Page 2 of 3
QUESTION TWO [20 MARKS]
(a) Write a C program which accepts two integers, and prints the result of multiplying the
two integers [6 Marks]
(b) Design a C program using pseudocode that calculate and outputs the area of circle given
that:-
(c) Outline the steps of develoing a C program [7 Marks]
QUESTION THREE [20 MARKS]
(a) Distinguish between the following terms as applied in programming providing an
example in aech case:
(i) Relational operators & arithmetic operators [4 Marks]
(ii) Direct constant & symbolic constant [4 Marks]
(iii)Low level & high level programming languages [4 Marks]
(b) List and briefly describe the three control structures supported by C programming
language [6 Marks]
(c) Outline two unique features of C programming language [2 Marks]
QUESTION FOUR [20 MARKS]
(a) Outline three differences between an interpreter and a compiler [3 Marks]
(b) Write a C program that will read and examine the value of a character variable called
colour. The program then prints one of the following messages, depending on the
charcter entered by the user:- [9 Marks]
(i) RED if either r or R is entered
(ii) GREEN, if either g or G is entered
(iii)BLACK, if any other character is entered
(c) Give two reasons of commenting a C program [2 Marks]
(d) Describe three types of errors in programming giving a suitable example in aecg case
[6 Marks]
Page 3 of 3
QUESTION FIVE [20 MARKS]
(a) Using IF… ELSE statements, design a C program that prompts the user to enter the
student position. The program should then award the student postion and dipaly the
granted award via the monitor screen. [6 Marks]

(b) Convert the above pseudocode into a C program [10 Marks]
(c) Define the following terms as used in programming:-
(i) Function [1 Mark]
(ii) Array [1 Mark]
(iii)Structure [1 Mark]
(iv)Variable [1 Mark]

(Visited 89 times, 1 visits today)