You are on page 1of 2

Bahria University, Islamabad

Department of Electrical Engineering


Object Oriented Programming (CSC-210) BEE-3 FALL 2020
Assignment# 01 Instructor: Asim Altaf Shah
Due date: October 27, 2020
Note: -

• Copied code will get zero (Do not copy. Even a single copied line reward you
zero)
• Write your program in any C++ Compiler Software (handwritten is not
acceptable.
• Paste screenshots of code and result for all questions
• This assignment is from CLO 1

Question no 1: Write a program to dynamically read group of numbers from user and
place them in an array of type float (size of array should be define by user on run time).
Once the numbers are stored in the array, the program should find the average of those
numbers and print it.

Question no 2: Dynamically initialize two arrays of same size and pass them to a
function. The function should add the individual entries of first array with second array
and should store them in the third array which should be returned to the main where it
should be printed

Question no 3: Take 10 numbers from user in main and then recursively compute the
product of these numbers.

Question no 4: Use 2D arrays to store two 3x3 16-bit images A and B. Take the pixel
values of each image from user and find the mean and variance of both images. Add
both images together and store the sum in third image C. Find the mean and variance of
the third image as well.

Question no 5: Use double pointers instead of 2D arrays to dynamically store the


images in Question 4. Take the number of rows and number of columns from user (note
that the size of all images should be same).

Page 1 of 2
Bahria University, Islamabad
Department of Electrical Engineering
Object Oriented Programming (CSC-210) BEE-3 FALL 2020
Assignment# 01 Instructor: Asim Altaf Shah
Due date: October 27, 2020
Question no 6: Take two strings from users and pass them to the function ‘bool
compstr(string s1, string s2)’. Inside the function definition, check if the two strings are
same or not. Return true if they are same and false if they are different.

Page 2 of 2

You might also like