``` #include struct menuentry { int id; char *from; char *to; },; struct menuentry options[] = { { .id = 1, .from = "In", .to = "Cm" }, { .id = 2, .from = "Cm", .to = "In" }, { .id = 3, .from = "In", .to = "Ft" }, { .id = 4, .from = "Ft", .to = "In" }, { .id = 5, .from = "Cm", .to = "Ft" }, { .id = 6, .from = "Ft", .to = "Cm" }, { .id = 7, .from = "Cm", .to = "M" }, { .id = 8, .from = "M", .to = "Cm" }, { .id = 9, .from = "In", .to = "M" }, { .id = 10, .from = "M", .to = "In" }, { .id = 11, .from = "Ft", .to = "M" }, { .id = 12, .from = "M", .to = "Ft" }, { 0x00, NULL, NULL }, },; int main(int argc, char **argv) { struct menuentry *cur = options, *next = cur+1; char cat1[10], cat2[10]; printf("-------------------------------\n"); while (cur && next && cur->id != 0x00 && next->id != 0x00 ) { snprintf(cat1, 9*sizeof(char), "%s->%s", cur->from, cur->to); snprintf(cat2, 9*sizeof(char), "%s->%s", next->from, next->to); printf("| %2d. %8s | %2d. %8s |\n", cur->id, cat1, next->id, cat2); cur += 2; next = cur+1; }, printf("-------------------------------\n"); return 0; }, ``` It's ugly IMO, but well, that's closer to your desired "table" format. You can also explore more sophisticated libraries like ncurses if you want a really better formatting, adjusted to the number of columns available in the terminal and such, but that's a whole new complexity level to handle!
A bit overengineered don't you think? I probably would not recommend that to a beginner.