Derived Data Types
What you’ll learn:
o What are derived data types
o Structures
o Unions
o Enumerations
What are Derived Data types ?
 These are composed of more than one type of data.
 We have already covered array and stri...
Structure
 Structure can contain more than one type of data.
 Syntax:
struct tag_name{
Data_type_1 variable_name;
…..
Da...
Union
 Special data type that enables us to store different types of data in the same memory
location, i.e. memory is sha...
Enumeration
 Consists of a set of named integer constants.
 Syntax:
enum tag_name{
……enum-list------
}
Upcoming SlideShare
Loading in...5
×

8.derived data types

77

Published on

Published in: Engineering
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
77
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

8.derived data types

  1. 1. Derived Data Types What you’ll learn: o What are derived data types o Structures o Unions o Enumerations
  2. 2. What are Derived Data types ?  These are composed of more than one type of data.  We have already covered array and strings.  More derived data types:  Structures  Unions  Enumerations
  3. 3. Structure  Structure can contain more than one type of data.  Syntax: struct tag_name{ Data_type_1 variable_name; ….. Data_type_n variable_name; } Struct tag_name variable_list; (Note: Variable list is of type struct)
  4. 4. Union  Special data type that enables us to store different types of data in the same memory location, i.e. memory is shared between these variables.  Only one member occupies memory at a given time.  Efficient way of using same memory location.  Prevents memory fragmentation.
  5. 5. Enumeration  Consists of a set of named integer constants.  Syntax: enum tag_name{ ……enum-list------ }
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×