Structures

Structures are a good way of storing variables of different types under one unit.

#include <stdio.h>

#define MAX_ELEMENT 65536

int main()
{
    int x = 0;

    // Declare a structure
    struct element
    {
        int component;
        int refdes;
        long double value;
    };

    // a[] is an array of structures
    struct element a[MAX_ELEMENT];

    a[x].component = 1;
    a[x].refdes = 100;
    a[x].value = 0.001;

    printf("a[%i] Component: %i\na[%i] Refdes: %i\na[%i] Value: %LF\n", x, a[x].component, x, a[x].refdes, x, a[x].value);

    return 0;
}