Lab 01 - PF Refresher
Lab 01 - PF Refresher
Spring 2022
Issue Date: August 18, 2022
LAB-01
Instructions!
1. Please follow dress code before coming to the lab. Keep your student identity cards with you.
2. This is an individual lab, you are strictly NOT allowed to discuss your solutions with your fellow
colleagues, even not allowed asking how is he/she is doing, it may result in negative marking. You
can ONLY discuss with your TAs or with me.
4. Strictly follow good coding conventions (commenting, meaningful variable and functions names,
properly indented and modular code.
5. Save your work frequently. Make a habit of pressing CTRL+S after every line of code you write.
6. Beware of memory leaks and dangling pointers.
Sample Execution:
Enter size of the array: 4
Enter elements of array: 1 2 3 4
Resized array: 1, 2, 3, 4, 2, 4, 6, 8
Sample Execution:
Enter a string: Equal matrices have equal dimensions
Punjab University College Of Information Technology Page 1 of 2
Madiha Khalid
CMP 142 – Object Oriented Programming
Spring 2022
Issue Date: August 18, 2022
LAB-01
Enter count: 5
Left substring: Equal
Use appropriate prompts for input and output to make your program easy to use. Furthermore, make sure
zero is the minimum score one can get (i.e. do not accept negative numbers for input).