#include "null_terminated_arrays.h" #include #include #include void reverse_array(const char **arr) { const char **p; for (p = arr; *p; p++) { continue; } p--; while (p > arr) { const char *tmp = *p; *p = *arr; *arr = tmp; arr++; p--; } } void reverse_matrix(const char ***matrix) { const char ***p; for (p = matrix; *p; p++) { continue; } p--; while (p > matrix) { reverse_array(*p); reverse_array(*matrix); const char **tmp = *p; *p = *matrix; *matrix = tmp; matrix++; p--; } if (p == matrix) { reverse_array(*matrix); } }