REPUBLIQUE DU CAMEROUN REPUBLIC OF CAMEROON
Paix-Travail-Patrie Peace-Work-Fatherland
MINISTERE DES ENSEIGNEMENTS SUPERIEURES MINISTRY OF HIGHER EDUCATION
Domain/VISHI
school: Engineering and technology
FIELD: COMPUTER ENGINEERING level II
Specialty/Option: Software Engineering & networking
February 2024 Programming II (HND II)
Subject/Code: programming
Time 120 mins
Exercise1(15marks)
1. Define : program , compiler, inheritance, object
(1.5x4=6mks)
2. Give two advantages of applying OOP in programming
(1.5x2=3mks)
3. State and explain two points of comparison between C and C++
(1.5x2=3mks)
4. Differentiate between a function and a procedure
(1.5x2=3mks)
Exercise2(20marks)
Consider the following algorithm, answer questions with clear
justifications
begin
Var i, f: integer;
f :=i;
i:=i-1;
while(i>0) do
begin
f :=f* i;
i:=i-1;
end;
EndWhile
ASSONFACK Maxim (PLET computer Engineering , Eng Telecom & Networking) Page 1/2
print(“The result is: ”,f);
end.
1. What are the standard data types declared in this algorithm?
(2mk)
2. How many times will line 7 and 8 be executed if the value of i is
5? (4mks)
3. What will be the value of f at the end of running this algorithm?
(2mk)
4. What is the code doing?
(2mks)
5. write the corresponding C++ program
(10mks)
Exercise3 (7x5=35marks)
Write a program that allows reading the mark of 50 students and
their names using
two vectors, the program should print the name and the mark of the
best student,
the name and the mark of the last student then the average mark of
the class.
Use an Array of real numbers to carry marks, then another array of
characters to carry names of students. Make sure to load or display
the two lists at the same time using the same loop.
1- Write a C function that allows to load a list of 50 marks
2- Write a C function that allows to load a list of 50 names
3- Write a C function that allows to display a list of 50 marks
4- Write a C function that allows to display a list of 50 marks
ASSONFACK Maxim (PLET computer Engineering , Eng Telecom & Networking) Page 2/2
5- Write a C function that allows to search and return the value of
the highest mark
ASSONFACK Maxim (PLET computer Engineering , Eng Telecom & Networking) Page 3/2