Get premium membership and access revision papers, questions with answers as well as video lessons.

Cisy 110:Introduction To Programming Question Paper

Cisy 110:Introduction To Programming 

Course:Computer Science

Institution: Kenya Methodist University question papers

Exam Year:2013



KENYA METHODIST UNIVERSITY

END OF 3''RD ''TRIMESTER 2013 (FT) EXAMINATION
FACULTY : COMPUTING & INFORMATICS
DEPARTMENT : COMPUTER SCIENCE AND BUSINESS INFORMATION
UNIT CODE : CISY 110/BBIT121/DCIS 110/DBIT 121
UNIT TITLE : INTROUDCTION TO COMPUTER PROGRAMMING
TIME : 2 HOURS




INSTRUSTIONS: Answer question one and any two other.

Question One

Define the following terms:
Algorithm
Variable

Syntax

(3mks)

State the uses of the following features in C++
Cout<<<
Cin>>

Iostream.

(3mks)

Describe the three qualities of a good algorithm.

(3mks)

State three features of a visual C++ programming language environment.

(3mks)

Explain the functions of the following software resources in programming
Compiler.

Debugger.

(2mks)

Outline two rules of declaring a variable/identifier.

(2mks)

Describe the four steps that have to be followed when writing an iteration statement.

(4mks)

Explain why it is important to comment a program.

(2mks)

Write a program that displays numbers 1 to 100 in descending order at the interval of 10.

(4mks)

Consider the following statement in the pseudo code below what will be the value that count will display

Count =1

do

Count = count + 3

While (count<10)
Display count. (2mks)

Identify and correct errors in the following program

If (c<7)
Cout<<" C is less than 7\n; (2mks)

Question Two

Describe the main feature of the following programming language generations
High level languages
Low level languages

Machine languages

(3mks)

You are appointed systems analyst of a nursery school. The first task is to write a program that teaches simple mathematics in a pre-unit class. You are required to write a program that asks a child to enter two numbers then computes sum, product, division and difference

Represent the above problem using flow chart and pseudo code.

(6mks)

Write a C++ program to implement that algorithms represented in (i) above.

(6mks)

Question Three

Below study the set of steps in developing a program

(15mks)

Develop the outline into a solution
Outline the solution
Test the algorithm for correctness
Code the program into a specific programming language
Define the problem
Document and maintain the program
Run the program on the computer

Arrange them into their logical sequence (ie 7,2,6,--------,n) (2mks)

Examine the following algorithm
Let sum = 0
Let x = 1
While x is less than 99

Increment by 5

Add x to sum

Display x
Display the value of sum
Stop

Using a suitable construct, implement a C++ program from the above algorithm. (6mks)

You are appointed a system analyst of a bureau. The first task is to write a program that converts currency. You are required to write a program that asks a client to enter currency in Kenya shillings then converts to US dollars and displays ( $ 1 = kes 87.00)

Write the problem analysis of the narrative.

(4mks)

Represent the above problem using flow chart.

(3mks)

Question Four

Write declarations statement or comments that accomplish each of the following tasks.

(13mks)

Comment that the program will capture the bin data
Declare the variables surname, last name, nationality, date of birth, current date, age.
Prompt a user to enter surname
Read the surname from user
Prompts user to enter last name
Read the last name from user
Prompts user to enter date of birth
Reads date of birth
Prompts user to enter current date
Reads current date
Compute the difference between current date and date of birth then store in variable age
Display the surname, last name, nationality and age.

Distinguish between single line and multiline comments.

(2mks)






More Question Papers


Popular Exams



Return to Question Papers