BIT1303A BBIT105  PROGRAMMING METHODOLOGY.

UNIVERSITY EXAMINATIONS: 2017/2018
EXAMINATION FOR THE DEGREE IN BACHELOR OF SCIENCE IN
INFORMATION TECHNOLOGY/ BACHELOR OF BUSINESS
INFORMATION TECHNOLOGY
BIT1303A BBIT105 PROGRAMMING METHODOLOGY
MODE: FULL TIME/PART TIME/DISTANCE LEARNING
ORDINARY EXAMINATIONS
DAY: MARCH.2019 DURATION 2 HOURS
INSTRUCTION: Answer question ONE and any other THREE questions

QUESTION ONE [30 MARKS]
a) Define the following terms as used in programming methodology.
i. Pseudocode.
ii. Algorithm.
iii. Programming paradigms.
iv. Structured programming.
4 Marks
b) State TWO advantages of structured programming.
2 Marks
c) State and explain the stages of program development lifecycle(PDLC).
6 Marks
d) Name and explain THREE programming errors.
6 Marks
e) Write a pseudo code for a program that calculate the area and perimeter of a rectangle once
given length and width values.
6 Marks
f) With an aid of a C program explain how conditional operators work.
6 Marks
QUESTION TWO [20 MARKS]
a) State two reasons for the shift from machine language to assembly language.
4 Marks
b) Explain two advantages of modular approach in programming.
2 Marks
c) Distinguish between reserved words and identifiers as used in programming.
4 Marks
d) Write a C program that accepts the name of a student. The program then outputs the name and
the message “Welcome to C Programming” on the same line.
6 Marks
e) Briefly explain any four programming tools.
4 Marks
QUESTION THREE [20 MARKS]
a) Write a C program that will prompt a student to enter the score obtained in a particular
subject. If the score is 1 or 2 the program outputs Distinction. If the score is 3 or 4 the
program outputs Credit. If the score is 5 or 6 the program outputs Pass. If the score is 7 the
program outputs Referred otherwise the program outputs Fail. Use case control structure.
6 Marks
b) State any FOUR rules of creating variables in C programming.
4 Marks
c) Describe the use of the following string functions in C language.
i. strlen ()
ii. strcpy ()
iii. strcat ()
iv. strcmp ()
v. strlwr()
vi. strupr()
6 Marks
d) Explain FOUR different primary data types used in C language. In in your explanation,
indicate maximum memory size for each type, values stored and the range of values.
4 Marks
QUESTION FOUR [20 MARKS]
a) The table below shows the charges applicable to different amounts of water consumed by
clients in a particular town. The volume consumed is in cubic meters(M3).

In addition to the consumption, the amount of the water bill will consist of a standing charge of
Ksh 200 and a sewerage fee equivalent to 20% of the consumption. Write a C program that
prompts a user to enter the volume of water consumed. The program then computes and outputs
the amount of the water bill. Use if…else control structure.
8 Marks
b) Explain is the difference between the constants 6,’6’ and “6”.
6 Marks
c) List and explain any FOUR format specifier in C language.
4 Marks
d) Explain the main difference between structure and union.
2 Marks
QUESTION FIVE [20 MARKS]
a) Differentiate argument and parameters as used in C functions.
2 Marks
b) Write a C program to receive ten integers, store them in an array then sort the elements in an
ascending order then display the sorted elements onscreen.
8 Marks
c) Explain FOUR features of the C language.
4 Marks
d) In C language, a pointer is a pointer is a variable or type that refers to the address of a value.
Explain any THREE uses of pointers.
6 Marks

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

Written by