4. Data Types
• A data type is a term which refers to the kind
of data that variables may hold in a
programming language.
• int a ; [ a can hold integer data type]
• char p; [ p can hold character data type]
5. Abstract Data Types(ADT)
• It is similar to structures in C, but can include functions in it.
• Definition: An ADT is collection of data and associated
operations for manipulating that data.
• Definition : ADT is a mathematical model with a collection of
operations defined on that model.
• ADT include 2 parts Data objects and Operations with data
object
Hierarchical Organized Program
6. Data Object
• A data object is the region of storage which
contains a value or the group of values.
• Data object refers to a set of variables used in
a program.
• A data object is an instance of a data type, just
as an object is an instance of a class
7. Data Structures
• It is a instance of ADT.
• Definition: A Data Structure is defined as a
triplet(D,F,A) where
– D=> Set of Domains
– F=> Set of operations
– A =>Axioms defining the functions in “F”
• Definition: A Data Structure is a collection of
organized data, so that items can be stored
and retrieved by some fixed technique.
– Eg. Array
9. Types of Data Structures cont..
• Primitive : These are the data types available in
most of the programming languages. These data
types are used to represent single value
• Non-Primitive :Data structures derived from
primitive.
• Linear : Elements are arranged in a linear fashion.
• Non-linear: Data values are not arranged in order
and a data item is connected to several other
data items
10. Static and Dynamic Data Structure
• Static: Memory for objects is allocated at the
time of loading of the program.
– Eg. Int a[30];
• Dynamic: The memory space required by
variables is calculated and allocated during
execution.
– Using malloc()