Different Between Structures and Unions?

1. The key word union is used instead of structure.

2. Single memory space is allocated for all the members.

3. Only one member is accessed any time.

Advantages of unions:

1. Unions are used to save the memory space.

2. Unions are useful to create the structure with variable fields.

Related

Write about Two Dimensional Arrays?

Two Dimensional Array is the combination of similar single dimensional array’s contains rows and columns. We can represent the data in Two Dimensional Arrays as table format. Two Dimensional Arrays...

How to Pass Structure Values as Parameters to Functions?

C supports the passing of structure values as arguments to functions. There are 3 methods by which the values of a structure can be transferred from one function to another. 1. The 1st method is to...

How to Pass Arrays to Functions?

One Dimensional Arrays: Like the values of simple variables, it is also possible to pass the values of an array to a function. To pass a one dimension array to a called function, it is sufficient ...

Post a Comment

emo-but-icon
:noprob:
:smile:
:shy:
:trope:
:sneered:
:happy:
:escort:
:rapt:
:love:
:heart:
:angry:
:hate:
:sad:
:sigh:
:disappointed:
:cry:
:fear:
:surprise:
:unbelieve:
:shit:
:like:
:dislike:
:clap:
:cuff:
:fist:
:ok:
:file:
:link:
:place:
:contact:

item