LabTest APR2023 PMDS
LabTest APR2023 PMDS
INSTRUCTIONS TO CANDIDATES
Please ensure that this examination paper contains THREE (3) pages before you
start the examination.
CLO 1: Generate C++ codes using arrays, structures, enumeration, recursive
functions.
Objective:
a. To test the students’ ability to write codes using various C++ components such
as arrays, structures, characters, strings and recursive functions.
b. To ensure that the students have grasped the basic programming concepts and
are able to apply them to solve problems.
a. List of software
Max 20% for coding work. (Additional 5% is awarded if the codes can
be executed without errors)
ALL THE FILES INTO A FOLDER, MUST BE ZIPPED AND NAMED AS SHOWN
Yourname_IDNumber.zip
Send the zipped folder via the appropriate submission link given in Disted E-
Learn.
Question 1 – Arrays
a) Write a structure to store the names, salary and hours of work per day of 10
employees in a company. Write a program to increase the salary depending on
the number of hours of work per day as follows and then print the name of all
the employees along with their final salaries.
Question 4 - Recursion
a) Based on the TEST DATA below, Write a program in C++ to get the largest
element of an array using recursion.
Test Data :
Input the number of elements to be stored in the array :5
Input 5 elements in the array :
element - 0 : Any Input
element - 1 : Any Input
element - 2 : Any Input
element - 3 : Any Input
element - 4 : Any Input
Expected Output :
Largest element of an array is: (Based on the Input given by the User)