0% found this document useful (0 votes)
67 views3 pages

CIT-3102-past Paper 2017

This document outlines the examination details for the Diploma in Information Technology at Meru University of Science and Technology for the course CIT 2151: Fundamentals of Computer Programming. It includes various programming questions related to C programming, such as differentiating programming concepts, writing programs, and explaining programming structures. The exam consists of five questions, with students required to answer question one and any two additional questions.

Uploaded by

Evans Ngebe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views3 pages

CIT-3102-past Paper 2017

This document outlines the examination details for the Diploma in Information Technology at Meru University of Science and Technology for the course CIT 2151: Fundamentals of Computer Programming. It includes various programming questions related to C programming, such as differentiating programming concepts, writing programs, and explaining programming structures. The exam consists of five questions, with students required to answer question one and any two additional questions.

Uploaded by

Evans Ngebe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
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: 020-2069349, 061-2309217. 064-30320 Cell phone: +254 712524293, +254 789151411
Fax: 064-30321
Website: www.must.ac.ke Email: info@must.ac.ke

University Examinations 2017/2018

FIRST YEAR SECOND SEMESTER EXAMINATION FOR THE DIPLOMA


IN
INFORMATION TECHNOLOGY

CIT 2151: FUNDAMENTALS OF COMPUTER PROGRAMMING

DATE: DECEMBER 2017 TIME: 11/2 HOURS

INSTRUCTIONS: Answer question one and any other two questions.

QUESTION ONE (30 MARKS)

a) Differentiate between the following as used in programming (4 marks)


i. Computer program and programming language
ii. Interpreter and compiler
b) Identify four benefits of flow charts in computer programming (4 marks)
c) State the stages used to develop C programs (4 marks)
d) Using C as a programming language write a program that displays twenty
consecutive numbers starting from 50 (6 marks)
e) Outline the difference between While Loop and Do While Loop statements as used
in programming (4 marks)
f) State two areas where C programming language is applied (2 marks)
g) Using an example, describe how you would do the following: (2 marks)
i. Insert a comment on a line
ii. Display the output on the next line

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


Foundation of Innovations Page 1
h) What is the output of the following program? (4 marks)
# include<stdio.h>
Int main()
{
Int x,y;
x=5;
y=++x;
pringf(“value of x = % and value of y=%d\n”,x,y);
return 0;
}

QUESTION TWO (20 MARKS)

a) Write a C program that prints the sum of all odd integer numbers between 20 and 30.
Use for loop (5 marks)
b) Write a C program that calculates the volume of a cylinder (5 marks)
c) Describe any two repetitive structures used in programming (4 marks)
d) Explain three methods used for testing a program for errors (6 marks)

QUESTION THREE (20 MARKS)

a) What is an array? Write a C program to Declare a two dimensional array called


student (5 marks)
b) Briefly describe the following as used in programming (3 marks)
i. Data type
ii. Functions
iii. Algorithm
c) Describe three types of operators used in programming and give an example in each.
(6 marks)
d) Using any loop structure Writ a C program that prints out the numbers below;
10
15
20

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


Foundation of Innovations Page 2
25
30

QUESTION FOUR (20 MARKS)

a) Outline three characteristics of a good programming language (3 marks)


b) Describe and with the aid of a flowchart, illustrate the execution of a while loop
(5 marks)
c) Describe the three fundamental building blocks of structures programming (6 marks)
d) Using a function write C program to input two numbers as argument and returns the
value of their sum (6 marks)

QUESTION FIVE (20 MARKS)

a) Describe how programming languages are classified (5 marks)


b) Write a C program using if-else statement that displays “PASS”if a student scores
mark 50 and above else it prints “FAIL” if he scores anything below 50 mark
(5 marks)
c) Write a C program which will output the following line of text “FUNDAMENTALS
OF COMPUTER PROGRAMMING CLASS” (5 marks)
d) Using an example, give the syntax for declaring a variable in C programming.
Describe the parts of the declaration (5 marks)

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


Foundation of Innovations Page 3

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy