difference between Structure and Union

Status
Not open for further replies.

Arrowspace

Banned
Joined
Jan 23, 2015
Messages
186
Helped
3
Reputation
6
Reaction score
3
Trophy points
18
Activity points
0
what is difference between Structure and Union in C programming ?
 

A structure is a collection of individual elements held under one name. Each element has it's own storage address within the structure.
A union is a collection of individual elements held under one name that share the same storage. In other words the elements overlap and changing one will make the values of other elements change as well.

Brian.
 
What is difference between Class and union.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…