DBIT303 COMPUTER PROGRAMMING CONCEPTS.

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

QUESTION ONE [30 MARKS]
(a) Explain five factors to consider while selecting a computer programming language
[5 Marks]
(b) Using an example, illustrate the use of a symbolic constant in a C program [4 Marks]
(c) List and briefly explain three type of control structures supported by C language.
[6 Marks]
(d) With the aid of an example illustrate the syntax of commenting a block of statement in C
programming language. [5 Marks]
(e) Write a C program that prompts the user to enter three numbers, calculate and outputs the
calculated sum [7 Marks]
(f) Outline three unique features of C programming language [3 Marks]
QUESTION TWO [20 MARKS]
(a) Outline five differences between low level and high level generation languages [5 Marks]
(b) KCAU Exams department processes student work study program as follows:
The application details for all the applicants are first entered into the student application
database system. The details are then verified for correctness based on information available
from KCAU database system.
Applications containing false information are rejected and the applications shortlisted for
faculty board approval process.

Required:
(i) Using pseudo code, present the information provided in table 1 above [6 Marks]
(ii) Using IF….ELSE statements, Write C code to convert the pseudo code into a C
program [9 Marks]
QUESTION THREE [20 MARKS]
(a) Explain the following terms as used in programming:-
(i) Coding
(ii) Variable
(iii)Array
(iv)Programming language
(v) Function [5 Marks]
(b) Outline the steps of developing a C program [6 Marks]
(c) Outline three advantages and two disadvantages of using functions in a C program
[5 Marks]
(d) Explain four data types supported by C language [4 Marks]
QUESTION FOUR [20 MARKS]
(a) Write a C program that reads the user entered Student Mark from a set of exams, then prints
“PASS” if the entered student mark is 40 and above , otherwise it prints “FAIL”
[8 Marks]
(b) Explain two benefits of using comments in a C program [4 Marks]
(c) A program error can either be syntax, logic or semantic. Classify the errors below:-
(i) Misspelling keywords
(ii) Integer division by zero error
(iii)Using undeclared variable
(iv)Indefinite loop [4 Marks]
(d) Give reason(s) why the following identifier names are invalid
(i) 50mark
(ii) surname Name
(iii)&total
(iv)char [4 Marks]
QUESTION FIVE [20 MARKS]
(a) List four relational operator symbols together with their names. [4 Marks]
(b) Write C language statements to:-
(i) Declare a variable named surname that accepts 5 characters [2 Marks]
(ii) Print a statement saying “C is a case sensitive language” [2 Marks]
(c) Define a function called Sum that takes two float arguments (X and Y), calculates and returns
their sum. Note:(main() function not required). [6 Marks]
(d) Differentiate between the following terms:- [6 Marks]
(i) Scanf function and printf function
(ii) Compiler & assembler
(iii)Software Testing & debugging

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

Written by