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

Programming Fundamentals

This document outlines an exam for a programming fundamentals course, listing three sections covering basic programming concepts, object-oriented principles, and bitwise operators. Section one includes multiple choice and short answer questions on data types, variables, logic, functions, classes, and writing simple programs. Section two requires choosing three of five programming questions. Section three involves a table calculating bitwise operations on two numbers.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Programming Fundamentals

This document outlines an exam for a programming fundamentals course, listing three sections covering basic programming concepts, object-oriented principles, and bitwise operators. Section one includes multiple choice and short answer questions on data types, variables, logic, functions, classes, and writing simple programs. Section two requires choosing three of five programming questions. Section three involves a table calculating bitwise operations on two numbers.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Republic of Rwanda

Ministry of Education
TVET NATIONAL COMPREHENSIVE ASSESSMENT
ACADEMIC YEAR 2019

EXAM TITLE: Programming Fundamentals /100Marks


RTQF LEVEL IV
OPTION: SOFTWARE DEVELOPMENT
DURATION: 3HOURS
INSTRUCTION TO CANDIDATES:
This exam has three section A, B and C
Section A: Answer all questions 55Marks
Section B: Choose Three Questions 30Marks
Section C: Compulsory question 15Marks

SECTION ONE: Answer all questions 55Marks

01. What are five basic elements of programming? 5Marks


02. List and explain the types of errors available in programming language.
6Marks
03. Why is pseudocode useful? 2Marks
04. Differentiate low level language from high level language and two examples for
each. 4Marks
05. Copy and complete the following table 5marks
Data types Size in bits on memory
Char
Integer
Float
Double
Boolean

Page 1 of 3
06. Give five examples of programming languages 5marks
07. By using truth table differentiate OR with AND logical operator. 4marks
08. Differentiate local variable from global variable 5Marks
09. Provide at least 5 advantages of using functions 5Marks
10. Differentiate between a class and object in relation to OOP 3Marks
11. a) write a program in C++ to accept a number, and display its cube. 3Marks
b) Draw the flowchart for the above program 3marks
12. Write a program in C++ allows the user to input two numbers and display the
maximum among them. 5marks
SECTION TWO: Choose Three Questions 30Marks

13. Explain the following terms 10Marks


a) Object oriented programming
b) Encapsulation
c) Inheritance
d) Abstraction
e) Polymorphism
14. Use a recursive function to calculate the factorial of a number supplied by
user.
15. Write a program to produce the following output:
*****
****
***
**
*
16. (a) List four ways to display data in JavaScript. 4Marks
(b) There are different steps to write a program in any programming language.
List them 6marks

Page 2 of 3
17. Briefly, Give a comparison between Object Oriented Programming (OOP) and
Procedure Oriented Programming (POP) by considering their features.(give at
least five features for each) 10Marks

SECTION THREE: Choose One question 15Marks

18. Consider a=77 and b=23 of type unsigned int. note that we have to consider 8
bits for each number. Fill in the following table comprising bitwise operators
15Marks
Expression Binary value Decimal value
a 01001101 77
b 00010111 23
a&b
a|b
a^b
b<<2
b>>1

19. (a) By using JavaScript, create a simple multiplication table asking the user
the number of rows and columns he wants. 9Mark
(b) What are the difference between compiler and interpreter? 6Marks

Page 3 of 3

You might also like