#include <stddef.h>
#include <stdio.h>

#define countof(array) (sizeof(array) / sizeof((array)[0]))

static const char *const a[] = { "One", "Two", "Three" };
static const char *const b[] = { "One", "Two", "Three", "Four", "Five" };

static const struct { const char *const *items; size_t length; } ab[] =
{
    { a, countof(a) },
    { b, countof(b) },
};

static const char *const c[] = { "One", "Two", "Three", NULL };
static const char *const d[] = { "One", "Two", "Three", "Four", "Five", NULL };
static const char *const *const cd[] = { c, d, NULL };

int main(void)
{
    puts("Using hardcoded lengths:");
    for (size_t i = 0; i < countof(ab); i++) {
        printf("%zu:\n", i);
        for (size_t j = 0; j < ab[i].length; j++) {
            printf("\t%zu: %s\n", j, ab[i].items[j]);
        }
    }
    puts("Using NULL-terminated arrays:");
    for (const char *const *const *p = cd; *p; p++) {
        puts("-");
        for (const char *const *q = *p; *q; q++) {
            printf("\t%s\n", *q);
        }
    }
}
