Pointers and Memory Management in a C+
Pointer Variables and the Address of a Variable
In C+, you can access a variable (memory location) by using its address instead of its name.
In order to do this, you must first define a variable called pointer vari
Linked Lists, Stacks, and Queues
A linked list is a series of connected nodes allocated in the heap.
A node is a structure variable or an object with two types of member variables:
A data part: one or more member variables appropriate to ho
The solutions of some problems are possible only if the data to be processed are stored in the main
memory, and are processed as a list.
For example, in order to read the test scores of 20 students, compute their average, and find
In addition to function main, a program source module may contain one or more other functions.
The execution of the program always starts with function main.
The statements of a function (other than function main) are executed only if that fu
Input / Output in C+
In C+ I/O operations are performed on standard I/O classes (aka stream classes) objects.
An object must also be connected to an input/output device or file on which the physical input/output
operations are performed.
Binary Trees and Hash Tables
An Example of a Binary Tree
A binary tree node is a structure variable or an object with three types of member variables:
A data part: one or more membe
Individual data items to be processed in a program may be related to the same entity. For example,
you may be required to process the following information about a product in a store:
One way to process thes
Certain computer problems are solved by repeating the execution of one or more statements a certain
number of times.
So far, we have implemented the repetition of one or more statements by using iterations or loops:
while loop, for loop, or do
Introduction to Classes
The concept of a class is the same as that of a structure: it is a user-defined data type that is used to
create a group of variables that may have different data types.
In addition to the data members, a member of a class can al