This question is related to programming language C...
in Softwares+OS+Programming by 1 7

2 Answers

0 votes
A structure is basically a user defined data which is available in C language.

Structure enable us to combine different data items.

A union is special data type available in C language.

Union allows storing the data types in the memory.
by 2 11
0 votes

Structure Programming Language:

  1. The keyword struct is used to declare a structure
  2. structure is a user define datatype
  3. individual member can be accessed at a time.
  4. structure elements don't share their memory.
  5. all the member in a structure are active a a time.
  6. memory is allocated for each member


Union in C Programming Language:

  1. The keyword union used to declare a union
  2. union is also user defined datatype
  3. only one member can be access at a time.
  4. largest elements memory is shared by other elements of union
  5. only one data member is active at a time.
  6. memory is allocated for largest member.
by 2 8
6,061 questions
26,814 answers
7,835 comments
6,081 users