C Programming Week13
C Programming Week13
Structures
• Collection of one or more variables, possibly of
different types, grouped together under a single
name for easy handling.
CS1100 • For example - a structure which represents a
Introduction to Programming point in a two dimensional plane
struct point{ A mechanism for defining
Structures compound data types
int x;
Madhu Mutyam
Department of Computer Science and Engineering int y;
Indian Institute of Technology Madras By itself it reserves
};
no storage
Course Material – SD, SB, PSK, NSN, DK, TAG – CS&E, IIT M 1 2
SD, PSK, NSN, DK, TAG – CS&E, IIT M
SD, PSK, NSN, DK, TAG – CS&E, IIT M 3 SD, PSK, NSN, DK, TAG – CS&E, IIT M 4
1
03/11/17
SD, PSK, NSN, DK, TAG – CS&E, IIT M 7 SD, PSK, NSN, DK, TAG – CS&E, IIT M 8
2
03/11/17
SD, PSK, NSN, DK, TAG – CS&E, IIT M 17 SD, PSK, NSN, DK, TAG – CS&E, IIT M 18
3
03/11/17
SD, PSK, NSN, DK, TAG – CS&E, IIT M 23 SD, PSK, NSN, DK, TAG – CS&E, IIT M 24
4
03/11/17
5
03/11/17
SD, PSK, NSN, DK, TAG – CS&E, IIT M 35 SD, PSK, NSN, DK, TAG – CS&E, IIT M 36
6
03/11/17
SD, PSK, NSN, DK, TAG – CS&E, IIT M 37 SD, PSK, NSN, DK, TAG – CS&E, IIT M 38