Department of Computing: Lab 1: Pointers & Inheritence
Department of Computing: Lab 1: Pointers & Inheritence
Introduction
This lab is about the pointers, inheritance and memory occupied by the data variables.
Objectives
This lab will revise the old concepts of the students, taught in the previous semesters.
Tools/Software Requirement
Description
Pointers are used to point towards a particular memory address. In this lab we will use the
pointers and perform task with the help of them. Other than this we will revise the concepts of
inheritance; concept previously studied in OOP; and will create a small, very basic application.
Lab Tasks
You are required to upload the lab tasks on LMS and the name of that tasks must be in this
format YourFullName_reg#.cpp
void main()
pa = &a; // Statement 2
pa = pa + 1; // Statement 3
pa = pa + 3; // Statement 4
pa = pa - 1; // Statement 5
Output:
Write a code to find the memory in bytes occupied by int, long, double, float and char.
Task 3
Write a program of bank management system to manage the account information using
inheritance concept.
Create a class Bank Account with the customer_name, account_number etc. as member
variables. Create the derived classes for two types of accounts i.e. current and saving. The
derived classes will update the balance and handle the deposit and withdraw cases. Customers
should be able to get updated balance after deposit and withdrawal amounts.
Deliverable
Students are required to upload the lab task on LMS before the deadline.