0% found this document useful (0 votes)
59 views10 pages

Syed Shams Haider 203 Lab Report 01

This document contains a lab report submitted by Syed Shams Haider to Ma'am Mehwish Mehmood of the Department of Electrical Engineering at COMSATS University Islamabad. It describes 3 lab tasks involving structures, pointers, and functions. It also lists 3 home tasks involving structures, arrays, sorting, and pointers to strings. The tasks focus on pass by value vs pass by reference in functions.

Uploaded by

Syed Shams
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views10 pages

Syed Shams Haider 203 Lab Report 01

This document contains a lab report submitted by Syed Shams Haider to Ma'am Mehwish Mehmood of the Department of Electrical Engineering at COMSATS University Islamabad. It describes 3 lab tasks involving structures, pointers, and functions. It also lists 3 home tasks involving structures, arrays, sorting, and pointers to strings. The tasks focus on pass by value vs pass by reference in functions.

Uploaded by

Syed Shams
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

COMSATS UNIVERSITY ISLAMABAD

Syed Shams Haider


FA19-BEE-203/ISB
Object oriented Programing
LAB REPORT - 01
SUBMITTED TO

MAAM MEHWISH MEHMOOD

DEPARTMENT OF ELECTRICAL ENGINEERING

Lab tasks
5.1. Write a program that declares a structure to store book Id, price and pages of a
book. The structure should include functions to assign user defined values to each book
and display the record of most costly book.

5.2. Write a program to take the values of two integers and use pointers to add 10 to the
value of each integer.
5.3. Write a function that swaps the values of two integer variables
a. using pass by value
b. and pass by reference and see their differences.
Home tasks
Task 01
There is a structure called employee that holds information like employee code, name,
date of joining. Write a program to create an array of the structure and enter some data
into it. Then ask the user to enter current date. Display the names of those employees
whose tenure is 3 or more than 3 years according to the given current date.
TASK 02
Write a function to sort data (in increasing order) in an array using
a. pass by value
b. and pass by reference
Task 03
Write a program that inputs a string value from the user and displays it in reverse using
pointer.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy