I want to increment up where I use a[0]. Something like a++. The only other solution I can think of is a switch case or a bunch of if/else if statement, but that seems inefficient. Is this possible?
#include <stdio.h>
int
main(void)
{
const char *a[6];
a[0]="one";
a[1]="two";
a[2]="three";
a[3]="four";
a[4]="five";
a[5]="six";
for (int i = 0; i < 6; i++)
{
printf("This old man, he played %s\nHe played knick-knack on my thumb\nKnick-knack paddywhack, give your dog a bone\nThis old man came rolling home\n\n", a[0]);
}
}
What about this?