Practice ยท 4 of 4
Read-Only Table Queries
Queries over a read-only table of C strings:
``c
/* returns 1 iff tab contains needle (strcmp equality). */
int table_contains(char *const *tab, size_t n, const char *needle);
/* returns the number of entries strictly shorter than len. NULL entries
count as length 0. */
size_t count_shorter(char *const *tab, size_t n, size_t len);
``
Difficulty: intermediate
Press Submit to check your solution.
Back to lesson: Practice: Two-Level Indirection Gym