0% found this document useful (0 votes)
16 views

CIT-3102-FUNDAMENTALS-OF-COMPUTER-PROGRAMMING.doc

This document outlines the examination details for first-year students at Meru University of Science and Technology, specifically for various Bachelor of Science programs. It includes instructions for the CIT 3102: Fundamentals of Computer Programming exam, detailing the structure and types of questions to be answered. The exam covers topics such as programming language evaluation, C program structure, and practical programming tasks.

Uploaded by

ianmuchiri7313
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

CIT-3102-FUNDAMENTALS-OF-COMPUTER-PROGRAMMING.doc

This document outlines the examination details for first-year students at Meru University of Science and Technology, specifically for various Bachelor of Science programs. It includes instructions for the CIT 3102: Fundamentals of Computer Programming exam, detailing the structure and types of questions to be answered. The exam covers topics such as programming language evaluation, C program structure, and practical programming tasks.

Uploaded by

ianmuchiri7313
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

MERU UNIVERSITY OF SCIENCE AND TECHNOLOGY

P.O. Box 972-60200 – Meru-Kenya.


Tel: +254(0) 799 529 958, +254(0) 799 529 959, +254 (0)712 524 293
Website: www.must.ac.ke Email: [email protected]

University Examinations 2018/2019

FIRST YEAR SPECIAL/SUPPLEMENTARY EXAMINATIONS FOR BACHELOR OF


SCIENCE IN COMPUTER SCIENCE, BACHELOR OF SCIENCE IN COMPUTER
TECHNOLOGY, BACHELOR OF SCIENCE IN COMPUTER SCIENCE AND
FORENSICS, SBACHELOR OF SCIENCE IN INFORMATION TECHNOLOGY,
BACHELOR OF BUSINESS INFORMATION TECHNOLOGY, BACHELOR OF
SCIENCE MATHEMATICS AND COMPUTER SCIENCE, BACHELOR OF SCIENCE
ACTURIAL SCIENCE, BACHELOR OF SCIENCE STATISTICS, BACHELOR OF
EDUCATION SCIENCE

CIT 3102: FUNDAMENTALS OF COMPUTER PROGRAMMING


DATE: SEPTEMBER 2019 TIME: 2 HOURS

INSTRUCTIONS: Answer Question ONE and any other TWO questions.

QUESTION ONE (30 MARKS)

a) Explain criteria a programmer should use to evaluate a programming language.


(4 marks)

b) Outline the format of a C program. (4 marks)

c) Use an example to differentiate between a compound statement and simple statement.


(2 marks)

d) Compare the two methods used to declare a constant in C programming giving an


example in each case. (2 marks)

e) Write a C program to input two numbers then add the two numbers and display.
(4 marks)

f) Differentiate between break and continue statements used in controlling loops.


(2 marks)

g) Explain the importance of comments and describe the two types of comments used in
C programming. (3 marks)

h) Briefly describe the purpose of the following as used in programming. (4 marks)

Meru University of Science & Technology is ISO 9001:2015 Certified


Foundation of Innovations Page 1
(i) Compiler

(ii) Assembly

i) Write a C program to enter 6 numbers into an array then display the biggest and the
smallest number. (5 marks)

QUESTION TWO (20 MARKS)

a) Describe the following as used in programming. (4 marks)

(i) Variables

(ii) Constants

b) (i) A retail shop wish acquire a program to enter product name, price and quantity
then calculate total price. Write a C program to solve the problem. (6 marks)

c) Write a C program to display numbers as shown below. (5 marks)

12345

1234

123

12

d) Write a program to input a word then display the number of characters entered.
(5 marks)

QUESTION THREE (20 MARKS)

a) Compare switch and if statements explaining where each can be applied appropriately.
(4 marks)

b) Write a C program that reads the radius of a sphere and calculate the volume. Where
volume = 4 3 Πr3 (4 marks)

c) Design a C program to enter input employee name, hours worked and rate per hour
via the keyboard then calculate the basic pay=hours worked*rate per hour. (6 marks)

d) Discuss challenges of developing a system using C programming language as


compared to other programming languages. (6 marks)

Meru University of Science & Technology is ISO 9001:2015 Certified


Foundation of Innovations Page 2
QUESTION FOUR (20 MARKS)

a) Use an example to illustrate the structure of a C function. (4 marks)

b) Write a program to enter 8 numbers then sort the numbers using linear sort technique.
(6 marks)

c) Write a program to create a data structure to store student name, mathematics, English
and Kiswahili marks then calculate total marks and average marks. (6 marks)

d) Write a program a Pascal program that converts temperature from degrees Celcius to
Farenheight. Where Farenheight=31+9/5*Celcius. The program should be presented
on the screen in the following format: 15 degrees Celcius is equal to 93.2 degree
Celcius. (4 marks)

QUESTION FIVE (20 MARKS)

a) Before the introduction of relational database, information system data were stored in
text files for future retrieval and data organization. Currently information systems
make use of database management system to organize and store data. Explain any 2
challenges that led to shifting from storage of data in text files to relational database
management system. (4 marks)

b) Differentiate between one dimension array and two dimension array. (4 marks)

c) Explain the importance of declaring variables. (6 marks)

d) Design a program to display 5 by 5 multiplication table. (6 marks)

Meru University of Science & Technology is ISO 9001:2015 Certified


Foundation of Innovations Page 3

You might also like