0% found this document useful (0 votes)
3 views

Lab Assignment #10

Uploaded by

eshfatina
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Lab Assignment #10

Uploaded by

eshfatina
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Inha University in Tashkent

School of Computer Science and Information Engineering


Course Name: Object Oriented Programming 1
Semester and Year: Fall Freshman, 2024
Laboratory Assignment 10: Object-Oriented Programming in C++

Note: 1. Submission only via E-CLASS is acceptable (If you have any issue with
E-CLASS, Please consult IT Dept.)

2. Comments should be included in your source code.

3. Do not plagiarize on doing your work, if we catch student doing so, he/she will
get ZERO for the Assignment.

4. Upload your completed laboratory exercise, named with your ID NUMBER.cpp


to the eClass system before the designated deadline: December 04, 2024.

Exercise 10: (Week #13: Pointers)

1. Write a program to demonstrate how an array can be passed to a function using


pointers. The function should take the array and its size as arguments and return
the largest element in the array.
2. Write a program that dynamically allocates memory for an array of integers
using new operator. The program should take n elements as input by user and
calculate the average of the elements using a pointer.
3. Write a C++ program that demonstrates how to access and modify elements of
a 2D array using pointers. The program should change the value of an element
and print the modified array.

You might also like