Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

INSTITUTE OF SPACE TECHNOLOGY

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.

number square cube


0 0 0
1 1 1
2 4 8
3 9 27
4 16 64
5 25 125
6 36 216
7 49 343
8 64 512
9 81 729
10 100 1000

25122020 Session-2020 1/1

You might also like