UNIVERSITY EXAMINATIONS: 2018/2019
EXAMINATION FOR THE DIPLOMA IN BUSINESS INFORMATION
TECHNOLOGY
DBIT303 COMPUTER PROGRAMMING CONCEPTS
FULLTIME/PARTTIME
DATE: NOVEMBER, 2018 TIME: 2 HOURS
INSTRUCTIONS: Answer Question One & ANY OTHER TWO questions.
QUESTION ONE [30 MARKS]
(a) Outline five differences between high level and low level programming languages [5 Marks]
(b) List any four rules that should be followed when naming variables [4 Marks]
(c) Outline the steps of developing a C program [6 Marks]
(d) Outline three benefits of using functions in a C program [3 Marks]
(e) Outline two effects of logical errors in a program [2 Marks]
(f) Write a C program that prompts the user to enter the word “PROGRAMMING”. The program
should then display the user entered word via the monitor screen [5 Marks]
(g) Explain the following terms as used in programming [5 Marks]
(i) Source code
(ii) Object code
(iii)Compiler
(iv)Comments
(v) Keyword
QUESTION TWO [20 MARKS]
(a) Using C programming language, write a program that will prompt the user to enter three
integers. The program then determines and outputs the average value of the user entered
numbers [7 Marks]
(b) Write statements in C programming language to illustrate the syntax of commenting.
[2 Marks]
(c) Explain the functions of pointers in programming [2 Marks]
(d) With the aid of an example, describe the sequence control structure [5 Marks]
(e) Explain two data types supported by C programming language [4 Marks]
QUESTION THREE [20 MARKS]
(a) Differentiate between selection and looping control structures as used in programming
[4 Marks]
(b) Outline two unique features of C programming language [2 Marks]
(c) The following data shows the details of drugs in a particular chemist. Use it to answer the
question that follows:
Required:
(i) Design a pseudo code for a C program that reads the drug name, quantity and unit price
per item and then computers the total cost given that: [6 Marks]
Total cost=unit price * quantity
(ii) Convert the above pseudo code into a C program [8 Marks]
QUESTION FOUR [20 MARKS]
(a) With the aid of an example, describe the structure of a C program [6 Marks]
(b) List and explain five factors you would consider while selecting a programming language
[5 Marks]
(c) Write a C program that calculates and outputs the area of a circle given that:-
cirleArea=3.14*radius*radius [7 Marks]
(d) Explain the term constant as used in programming [2 Marks]
QUESTION FIVE [20 MARKS]
(a) Explain why comments are necessary in a C program [2 Marks]
(b) Explain the function of the following reserved words as used in programming:-
(i) Void [2 Marks]
(ii) define [2 Marks]
(c) Classify the following commands as either input or output commands as used in pseudo
codes: [4 Marks]
read, get, print, show
(d) Using If…Else statements, Write a C program that prompts the user to enter two numbers.
The program should then compare the user entered numbers and display an output stating
whether the first number was greater than or less than the user entered second number.
[7 Marks]
(e) Outline three advantages of pseudo code as a program design tool [3 Marks]