DBIT 303 COMPUTER PROGRAMMING CONCEPTS.

UNIVERSITY EXAMINATIONS: 2017/2018
EXAMINATION FOR THE DIPLOMA IN BUSINESS INFORMATION
TECHNOLOGY
DBIT 303: COMPUTER PROGRAMMING CONCEPTS
DATE: DECEMBER, 2017 TIME: 1 ½ HOURS
INSTRUCTIONS: Answer ANY THREE questions.

QUESTION ONE [20 MARKS]
(a) Outline five benefits of high level programming languages over low level programming
languages [5 Marks]
(b) Define the following terms as used in programming:- [5 Marks]
(i) Coding
(ii) function
(iii) Variable
(iv)Comment
(v) Compiler
(c) Explain five factors that determine the choice of a programming language to use when
developing an application [5 Marks]
(d) Using an example, illustrate the use of a symbolic constant in a C program [5 Marks]
QUESTION TWO [20 MARKS]
(a) Using the for loop, Write a C program that would count down from 50 to 15 [6 Marks]
(b) List and explain the three control structures supported by C programming language
[6 Marks]
Page 1 of 3
(c) Give four examples of arithmetic operators in C [4 Marks]
(d) Write a C program that prompts the use to enter his/ her Firstname and Surname; the
program should then display the user entered two names via the screen [4 Marks]
QUESTION THREE [20 MARKS]
(a) Write a C program code prototype to create a function called calculateSum, that accepts
numberone and numbertwo as arguments and returns the Sum of numberone and numbertwo
[8
Marks
(b) Giving examples, explain the following types of program errors:- [6 Marks]
(i) Syntax errors
(ii) Semantic errors
(iii) Logical errors
(c) Write a pseudo code description for a program that reads four numbers; calculates the sum
and average of the entered numbers and prints the average results [6 Marks]
QUESTION FOUR [20 MARKS]
(a) (i) Using an example, show how to insert a comment in a C program [4 Marks]
(ii) Outline two benefits of using comments in a C program [2 Marks]
(b) Using examples, Classify the following pseudo code commands as either input, processing
or output commands:
Enter, Show, Compute [6 Marks]
(c ) Using IF Else statements, Write a C program that prompts the user to enter the student mark.
The program should then grade the user entered mark and displays the grade [8 Marks]
Note: Use the mark grading criteria provided below:-
Student Mark                                                         Awarded Grade

QUESTION FIVE [20 MARKS]
(a) Explain why C language is said to be case sensitive, citing any challenge posed by this
characteristic [2 Marks]
(b) Distinguish between the following terms:- [6 Marks]
(i) Definite loop & Indefinite loop
(ii) Compiler & interpreter
(iii) Program & programming language
(c) Briefly describe the four basic data types used to declare variables in C programming
language [8 Marks]
(d) Write a C program that would output the statements below as they are:[4 Marks]
This is my first C program
C language is a high level programming language
I love programming in C language

(Visited 202 times, 1 visits today)
Share this:

Written by