Skip to main content

Practice · 1 of 4

The argv Model

CHALLENGE
Difficulty: intermediate+25 XP

Work with an array of strings the way main does: ``c /* returns the total number of characters across all strings in tab (n entries; a NULL entry counts 0 and stops nothing). */ size_t total_chars(char *const *tab, size_t n); /* finds the longest string's INDEX (first wins ties); -1 if none. */ long longest_index(char *const *tab, size_t n); ``

Back to lesson: Practice: Two-Level Indirection Gym