Unit -1


 Abstracting data types: Fundamental and derived data types

Primitive data structures.

Q. What is data structure?

1.  A data structure is a particular way of storing and organizing data inside computer memory (RAM).

2.  In computer science a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.

3.  E.g. arrays, linked-list, queues, stack, binary tree, and hash tables

4.  Data structures are used in almost every program and software.

5.  Data structures mainly specifies the four things:-

a.  Organization of data

b.  Accessing methods

c.   Degree of Associativity &

d.  Processing alternative for information.


Q. What are the areas where we can use data structure?

1.  Compiler design

2.  Simulation

3.  Operating system

4.  Data base application (DBMS)

5.  Graphics

6.  Statistical Analysis and package

7.  Numerical Analysis


Abstracting data types: Fundamental and derived data types

1.  The abstract data type is a kind of data type, whose behaviour is defined by a set of operations and set of values.

2.  Like data type we can also use the “abstract” keyword, and we can also perform different operations.

3.  The Abstract data type is made up of primitive data-types, but its logical operations are hidden.

4.  Abstract data-type doesn’t specify, in memory how data will be organized and while performing operations what algorithms will be used.

5.  Due to its implementation and independent view it is called as “abstract”. Abstraction is the process of providing only the essentials and hiding the details.

6.   Examples of Abstract data-types are Stack, Queue, and List etc.

Some operations of those above mentioned ADT are: -

Stack: -

a.  To check whether stack is full or not isFull()is used.

b.  To check whether stack is empty or not isEmpty()is used.

c.   To push x into the stack push(x) is used.

d.  To delete one element from top of the stack pop()is used.

e.  To get the top most element of the stack peek() is used.

f.    To get number of elements present into the stack size() is used.

Queue: -

a.  To check whether queue is full or not isFull() is used.

b.  To check whether queue is empty or not isEmpty() is used.

c.   To add x into the queue at the rear end insert(x) is used.

d.  To delete one element from the front end of the queue delete() is used.

e.  To get number of elements present into the queue size()  is used.

List: -

a.  To get number of elements present into the list size() is used.

b.  To insert one element into the list insert(x) is used.

c.   To remove given element from the list remove (x) is used.

d.  To get element at position i get(i) is used.

e.  To replace x with y value replace(x, y) is used.

Note: - What is stack, queue and list we will see in our next topic

Q. What is Fundamental Data-types and Derived Data-types?

Fundamental Data-types: -

1.  The Data-type which are used by the programmer directly to store only one value as per requirement, and they are predefined known as Fundamental Data-types.

2.  Integer type, Character type, and Float type data are used by programmer directly to store values.

3.  Examples of Fundamental Data-types are int, char and float, etc.



Derived Data-types: -

1.  The Data-types which are derived using built-in Data-type known as Derived Data-types.

2.  Derived Data-type are designed by the programmer to stire multiple values of same type as per their requirement.

3.  Examples of derived Data-types are Array, Pointer, Function, list, etc.

User-defined Data-type: -

1.  The Data-types which are derived using built-in Data-type known as User defined Data-types.

2.  These types of data are wrapped into a single data-type to store multiple values of either same type or different type to store multiple values of either same type of different type or both as per the requirement.

3.   Examples of user-defined Data-types are class, structures, etc.

Q. Difference between Fundamental and Derived Data-types.


Primitive data structures. We will discuss about primitive data type in classification of data structure.

Classification of Data structure:


Generally categorized into two classes:

1.  Primitive Data structure

2.  Non-primitive Data structure

Primitive Data structure: -

1.  Primitive Data structure are the fundamental data structure which are supported by a programming language.

2.  Primitive data structures are basic structure and are directly operated by the machine instructions.

3.  Some basic data types which fall in these categories are char, int, float, and double.

Non-primitive Data structure: -

1.  Non-primitive data structures are those data structure which are created using primitive data structure.

2.  Non-primitive data structure is a group of homogeneous (same type) or heterogeneous (different type) data item.

3.  Non-primitive data structure are derived into two types: -

a.  Linear non-primitive data structure (e.g. arrays, stacks, queue, linked list)

b.  Non-linear non-primitive data structure (e.g. tress and graphs).

Linear Data-structure: -

        A data structure that maintains a linear relationship between its elements called linear data structure. Example array, stack, queue, and linked list (list).


Non-Linear Data-structure: -

        A data structure that does not maintains any linear relationship between its elements. They maintain hierarchical relationship between the elements. Example tree and graph.

******************** THE END ********************

Other links: -

Semester 4th previous year question

Data Structure using C: -Click me    
Object Oriented Programming C++: -Click me
Data base management system: - Click me   
 System Analysis and management information system- Click me 
 Digital Electronics and microprocessor: -Click me  

Semester 3rd previous year question
Computer Organization and Architecture  : - Click me

Operating System:-  Click me
Introduction to Software Package: - Click me

Computer Programing Through 'C':- Click me

Semester 5th previous year question


Internet and Web Technologies -Click me
Software Engineering : - Click me    

System maintenance: - Click me   

Data Communication and Networking : - Click me
JAVA: - Click m

Semester 6th previous year question 

Management: - Click me 

System Software: - Click me

Visual Basic: - Click me 

Computer Graphic: - Click me  Multimedia (Elective - C): - Click me  

No comments:

Post a Comment

Please do not enter any spam link in the comment box and use English and Hindi language for comment.

Latest Update

Key Components of XML

Popular Posts