UNIVERSITY EXAMINATIONS: 2021/2022
EXAMINATION FOR THE DIPLOMA IN BUSINESS INFORMATION
TECHNOLOGY
DBIT 303: COMPUTER PROGRAMMING CONCEPTS
FULLTIME/ PARTTIME
DATE: DECEMBER, 2021 TIME: 2 HOURS
INSTRUCTIONS: Answer question one and any other two Questions.
QUESTION ONE [20 Marks]
(a) What is the difference between a variable and array as used in C programing [2 Marks]
(b) Write a simple code that can be used to demonstrate structures in a C program:
Using struct student, as the structure. [10 Marks]
(c) Explain the following terms as used in programming: – [4 Marks]
(i) Source code
(ii) Error
(iii)Compiler
(iv)Programming
(d) Using a well explained code, describe the structure of a C program [4Marks]
QUESTION TWO [15 Marks]
a) Give any five operator that are used in c programming [5 Marks]
b) Write a program to print the corresponding Celsius to Fahrenheit table. With Celsius
values from 0 to 300 with a difference of 20 between the value i.e 0, 20, 40,…….280,300
[10 Marks]
QUESTION THREE [15 Marks]
a) Design a flowchart and well documented program to print natural number from 1-100
[10 Marks]
b) Write a simple program in C that can be used to find the Area of a trapezium
(5 Marks)
QUESTION FOUR [15 Marks]
(a) Describe any three types of programming error [6 Marks]
(b) Outline three differences between an interpreter and a compiler [6 Marks]
(c) Give three importance of a comment in a program [3 Marks]