Lab Exam Qs Set1
Lab Exam Qs Set1
Instructions
Read the instructructions carefully .
All questions are compulsory.
First of all create a folder on Desktop and name it with your 12 digit student id
Please note that your PROGRAM FILE NAMES must be as per stated requirements.
Your program must contain reasonable number of comments which should include your
name and Student ID as well.
The variable naming conventios, division of the code into separate functional units will also
carry marks. (Readability and Maintainability)
Please do not access your program files after the stipulated time period for the LAB
examination.
The system maintains date and time stamp upto milli seconds for such accesses. If it is
found that you have modified your file after the stipulated time period then no evaluation
will be performed for such programs.
Each question carries 10 marks
======================================================================
Q1) The program should be saved as Prog1.cpp
You are required to exhibit your programming skills in creating a linked list data structure.
In your program the structure will have following elements.
Customer Name
Menu Item Number
Last month frequency
(The last two items can be safely presumed as unsigned integer)
Your program will seek input from the end user to capture the above values
After the end of the input you will print the list in the same order as it is entered.
Customer Name: Bhavesh
Menu Item: 20
Last Month Frequency: 23
Customer Name: Ramesh
Menu Item: 3
Last Month Frequency: 5
PTO
Q2) The program should be saved as Prog2.cpp
Write a program to create a linked list by takeing user input and delete a particular element
from it. Take user input to delete element. Display the element of linked list before and after
deletion.
For example:
Input list= 5 7 9 3 7 4 1 2 8 7
Element to be deleted = 3
Output list = 5 7 9 7 4 1 2 8 7
Q3) The program should be saved as Prog3.cpp
Sort following data using selection sort method:
35, 33, 42, 10, 14, 19, 26, 44, 26, 31