2.7 Count [ToC] [Index]     [Skip Back] [Skip Fwd]     [Prev] [Up] [Next]

This function returns the number of items currently in a table.

9. <Table count function prototype 9> =
size_t tbl_count (const struct tbl_table *);

The actual tables instead use a macro for implementation.

Exercises:

1. Implement tbl_count() as a macro, on the assumption that struct tbl_table keeps the number of items in the table in a size_t member named tbl_count. [answer]