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

Introduction To Programming(Dcis 110) (Dbit 121) Question Paper

Introduction To Programming(Dcis 110) (Dbit 121) 

Course:Computer Science & Business Information

Institution: Kenya Methodist University question papers

Exam Year:2012



TIME : 2 HOURS

INSTRUCTIONS
Answer question ONE and any other TWO questions.
Question One (20 Marks)
Briefly describe the following terms as used in programming;
(10 marks)
Algorithm.
Pseudocode.
Program.
Programming language.
Flow chart
Variables from a key concept in the implementation of computer programes, particularly in the allocation of memory;
What is a variable?
(2 Marks)
State and briefly describe the two types of variable used in programming.
(4 Marks)

With help of a good example, describe the general structure of a conditional if statement.
(6 Marks)
Programming languages may be divided into high-level languages and low-level languages.
Briefly describe the two categories.
(4 Marks)
Give two differences between these two categories.
(4 Marks)

Question Two (15 Marks)
With the help of an appropriate example, describe how you declare any array in C++, outlining all the elements of the declaration.
(6 Marks)

Write a C++ program that takes in two numbers multiplies the smaller number by five, and the larger number by 2. Incase where the numbers are equal it multiplies both by three. The program then displays the new two numbers.
(9 Marks)

Question Three (15 Marks)
Loops or iteration is used in programming to provide mechanisms for executing statements repeatedly;
State the two types of loops used in programming.
(2 marks)
Give the three loop structures defined in C++.
(3 Marks)

Using appropriate illustrations, describe the five flowchart symbols.
(10 Marks)


Question Four (15 Marks)
A C++ program comprises of the function main and zero or more user-defined functions;
Define functions.
(2 Marks)
Describe the role played by the function main in a C++ program.
(2 Marks)
Why do we need user-define functions?
(2 Marks)

With respect to functions, describe the following terms;
(6 Marks)
Function header.
Function prototype.
Function call.
Briefly describe the role played by comments in a C++ program and give the two approaches used in writing comments.
(3 Marks)






More Question Papers


Popular Exams


Mid Term Exams

End Term 1 Exams

End Term 3 Exams

Opener Exams

Full Set Exams



Return to Question Papers