This document contains instructions for a programming fundamentals lab final exam. It provides details about credentials, webcam use, prohibited materials, maximum time allowed, and consequences for cheating. The exam contains 4 questions worth a total of 40 marks. Question 1 asks students to write a C++ program that takes 5 integers as input in an array and displays them using a pointer. Question 2 involves declaring a structure to store book details and displaying the most costly book. Question 3 requires calculating row and column sums of a 2D array. Question 4 is to write a C++ program that outputs a table with numbers, their squares, and cubes using a for loop.
This document contains instructions for a programming fundamentals lab final exam. It provides details about credentials, webcam use, prohibited materials, maximum time allowed, and consequences for cheating. The exam contains 4 questions worth a total of 40 marks. Question 1 asks students to write a C++ program that takes 5 integers as input in an array and displays them using a pointer. Question 2 involves declaring a structure to store book details and displaying the most costly book. Question 3 requires calculating row and column sums of a 2D array. Question 4 is to write a C++ program that outputs a table with numbers, their squares, and cubes using a for loop.
DEPARTMENT OF COMPUTER SCIENCE & ELECTRICAL ENGINEERING
109103 - Programming Fundamentals Lab Batch & Section: BS CS-01 (B) Assessment Final/OHT: Lab Final Prepared by (sign): Saniya Zafar Student Registration No.: Max Time Allowed: 1.25 hour (exam solving time) + 15 mins (uploading time) Student Full Name: Max Marks: 40 Approved by (sign): Dr. Khurram Khurshid
Provide your credentials on this question paper.
Turn on your webcams as this is an online exam Place your notes and other helping materials far from your exam desk Be sure that you do not possess a mobile or other electronic gadget during the exam time Leaving your exam place during exam is not allowed Please go through your exam and ask queries in first 10 minutes of exam Answer all the questions on your Microsoft word and upload it on MS Teams. Cheating by all means is prohibited and any such attempt may leads to serious consequences.
Question # 1 [CLO-2; PLO-2; Q Marks-10]
Apply C++ knowledge to write a program that takes five integers as input in array and display them using pointer.
Question # 2 [CLO-4; PLO-6; Q Marks-10]
Write a program that declares a structure to store book ID, price and pages of a book. It defines two structure variables and input values. Develop solution that displays the record of most costly book.
Question # 3 [CLO-3; PLO-5; Q Marks-10]
Use visual studio to write a program in C++ to write a C++ program which calculates sum of each column and row separately. For this, first create a 2D array (3 rows, 5 columns) and then ask the user to input values in the array. After that, first calculate sum of each row separately and display that sum. Then, calculate sum of each column separately and display that sum on the screen.
Question # 4 [CLO-1; PLO-1; Q Marks-10]
Write a C++ program by comprehending the basics of C++ and produce the following output using for loop.