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

CS-206 Data Structures and Algorithms Lecture 3

The document outlines the presentation agenda for a course on Data Structures and Algorithms, focusing on Abstract Data Types (ADTs) and their implementations. It covers various data types including Integer, Real, Character, and Boolean data, as well as programmer-defined data types such as typedefs, enumerations, classes, and pointers. Additionally, it discusses basic pointer operations including dereferencing, assigning, comparison, and the NEW operation.

Uploaded by

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

CS-206 Data Structures and Algorithms Lecture 3

The document outlines the presentation agenda for a course on Data Structures and Algorithms, focusing on Abstract Data Types (ADTs) and their implementations. It covers various data types including Integer, Real, Character, and Boolean data, as well as programmer-defined data types such as typedefs, enumerations, classes, and pointers. Additionally, it discusses basic pointer operations including dereferencing, assigning, comparison, and the NEW operation.

Uploaded by

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

CS-206 Data

Structures and
Algorithms
Dr. Mariam Nosheen
Presentation Agenda
Abstract Data types

A First Look at ADTs and Implementations


Abstract Data types

A First Look at ADTs and Implementations


Abstract Data types

A First Look at ADTs and Implementations


Abstract Data types

A First Look at ADTs and Implementations


 Integer Data
• Unsigned Integers The set of nonnegative integers,
sometimes called cardinal numbers or whole numbers,
is to, 1,2,3, ... }.
• Signed Integers The set {... ,-3, -2, -1,0,1,2,3, ... }of
integers together with the familiar arithmetic
operations also is an ADT.
• Over flow
Abstract Data types

A First Look at ADTs and Implementations


 Real Data
Real values, also called floating-point values, are modeled in
C++ by the single precision type float, the double-precision
type double, and the extended-precision type long double.
Type double is the default type used for processing real
data.
Abstract Data types

A First Look at ADTs and Implementations


 Character Data
A text document is written using a set of characters that is appropriate for that kind of
document. This character set will obviously be different from one kind of text to another; for
example, a report submitted to a scientific journal will probably use some symbols that are not
used in a personal letter; and an English novel surely needs different characters than a Greek
manuscript. Two main character sets are used in programming languages. ASCII (American
Standard Code for Information Interchange) is the most common, but some languages such as
Java use Unicode. Both of these are based on the assignment of a numeric code to each of the
characters in the character set. In C++, characters are normally processed using the char type,
which represents each character using a numeric code that can be stored in one byte.
Abstract Data types

A First Look at ADTs and Implementations


 Boolean Data
The set of logical values is much smaller than that of integers, real numbers, and character sets.
It consists of only two values false and true. In computing, these are usually referred to as
Boolean values. The key operations are conjunction, disjunction, and negation, which are better
known as the and, or, and not operations, respectively.
Abstract Data types

Programmer-Defined Data Types


As programmer languages developed, new features were
incorporated into them that made it possible for a
programmer to extend the language by adding new data
types.

Typedefs The typedef mechanism can be used to create a new type by


giving a new name to an existing type. One form of it is
Abstract Data types

Programmer-Defined Data Types


Enumerations
Abstract Data types

Programmer-Defined Data Types


Classes
Abstract Data types

Programmer-Defined Data Types


Pointers
Abstract Data types

Programmer-Defined Data Types


Pointers
Basic Pointer Operations
• Dereferencing and Indirection
Abstract Data types

Programmer-Defined Data Types


Pointers
Basic Pointer Operations
• Assigning
Abstract Data types

Programmer-Defined Data Types


Pointers
Basic Pointer Operations
• Comparison
Abstract Data types

Programmer-Defined Data Types


Pointers
Basic Pointer Operations
• NEW operation
Abstract Data types
Abstract Data types
Abstract Data types
Lab work

You might also like