Академический Документы
Профессиональный Документы
Культура Документы
ANDHRA PRADESH
Name :M.Subramanyam
Designation :Senior Lecturer
Branch :Computer Engg.
Institute :Q.Q.Govt.Polytechnic,Hyderabad.
Year/Semester :III Semester
Subject :UNIX & C
Subject Code :CM-304
Topic :Structures
Duration :50 Min
Sub Topic :Array of structures&self referential
structures
Teaching Aids :PPTs, Animation
CM304.80 1
Recap
CM304.80 2
Objectives
CM304.80 3
Array of Structures
CM304.80 4
Array of Structures
Contd…..
Usage
arrayname[i].membername;
where i varies from 0 to size-1
Example
struct student
{
int empno;
float sal;
char gender;
};
CM304.80 5
Array of Structures Contd…..
struct student s[5];
Memory allocated=5*7=35 bytes
CM304.80 7
Example
Contd…..
CM304.80 8
Structure containing Pointers
CM304.80 9
Example
CM304.80 10
Self Referential Structures
CM304.80 11
Example
struct node
{
int data;
struct node *link; /* link is a pointer of type struct node*/
};
CM304.80 12
Example
CM304.80 13
Summary
CM304.80 15
Quiz
CM304.80 16
Frequently Asked Questions
CM304.80 17
Assignment
structures.
CM304.80 18