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

Bbit 121:Introduction To Programming 1St Trimester 2017 Question Paper

Bbit 121:Introduction To Programming 1St Trimester 2017 

Course:Bachelor Of Business Information Technology

Institution: Kenya Methodist University question papers

Exam Year:2017



INTRODUCTION TO PROGRAMMING (BBIT 121) (CISY 110) (COMP 110) (BSIS 113) (MISC 431) (DCIS 110) (DBIT 121) 1ST TRIMESTER 2017
KENYA METHODIST UNIVERSITY

END OF 1'ST 'TRIMESTER 2017 (FT) EXAMINATION

SCHOOL : SCIENCE AND TECHNOLOGY
DEPARTMENT : COMPUTER SCIENCE
UNIT CODE : 'BBIT 121/CISY 110/COMP 110/BSIS 113/MISC 431/ DCIS 110/DBIT 121
UNIT TITLE : INTRODUCTION TO PROGRAMMING
TIME : 2 HOURS


Instructions:

Answer question one and any other two questions.
SECTION A (30 Marks)


Question One
Briefly describe the following terms as used with computer programming:-
Program
Programming language
Algorithm
Flow chart
Function
(10 Marks)
Using the FOR Loop statement, write a program that will find the square of ten numbers.
(4 Marks)
Design an algorithm that would be used for a program to add two numbers and display the results
(5 Marks)
What are the three common errors encountered in programming. (3 Marks)
Study the pieces of code-below
#include

Void main ()

{

For (int i=0;<10i++)

Count<
}

Write similar program that can produce the same output using the while and the do..while statements respectively. (4 Marks)
Write a C++ Write a program for computing area and the circumference of a circle with a global constant variable P1=3.14.
(4 Marks)


Question Two
Briefly describe any five flowchart symbols
(10 Marks)
Using an example to illustrate, describe the components of a C++ program
(5 Marks)


Question Three
Using switch and if …. else statements, write the two grading programs. Consider the following grading system;
70-100 First Class Honors

60-69 Second Upper Division

50-59 Second Lower Division

40-49 Pass

0-39 Fail (10 Marks)
Using the break statement write a program that computes the sum of a set of negative numbers and the break statement should exit the loop when it encounters a positive number
(5 Marks)



Question Four
Write a C++ program that uses a for-loop to input ten numbers and add them
(10 Marks)
Rewrite the following code by filling in the blanks
(5 Marks)
//This programe reads and multiplys 2 numbers

# include

________main ()

{

Int a.b.c

Cout<< "\nenter a numeric value:";

Cin>>____________;

_____=__________*___________;

Cout<< "\n the product of "<<_______<<" and "<<_______<<"

Is"

<<___________<
___________0;






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