Computer-Based Training (CBT) or Internet-Based Training (IBT) or Web-Based Training (WBT) courses at BengalStudents website

Using Unions

Submitted by Publisher on Sun, 03/10/2013 - 21:51

Using Unions

Now let's focus on the applications of unions. Basically, there are two kinds of union applications, which are introduced in the following two sections.
Referencing the Same Memory Location Differently

Question and Answer

Submitted by Publisher on Sun, 03/10/2013 - 21:25

    Q Why do you need structures?

    A In practice, you need to collect and group data items that are relevant but of different types. The structure data type provides a convenient way to aggregate those differently typed data items.

Arrays of Structures

Submitted by Publisher on Sun, 03/10/2013 - 21:21

Arrays of Structures

In C, you can declare an array of a structure by preceding the array name with the structure name. For instance, given a structure with the tag name of x, the following statement

struct x array_of_structure[8];