Declare parameter as double pointer (pretend you receive an 1-dimensional array of pointers). Since such array lies in memory contiguously, you can compute position of current element.
void output(lookup** table, int rows, int cols)
{
lookup* current_lookup = NULL;
for (int i = 0; i < rows; i++)
{
for (int j = 0; j < cols; j++)
{
current_lookup = table[i*cols + j];
printf("Action: %c, state: %d\n", current_lookup->action, current_lookup->state);
}
}
}
You call it by passing first element of an array:
int main()
{
lookup* table[rows][columns];
//....
output(table[0]);
return 0;
}