Programming Fundamentals
Programming Fundamentals
Ministry of Education
TVET NATIONAL COMPREHENSIVE ASSESSMENT
ACADEMIC YEAR 2019
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
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
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