I have a char* array as follows:
char*
char *tbl[] = { \"1\", \"2\", \"3\" };
How do I use the sizeof operator to get t
sizeof
Yes,
size_t n = sizeof(tbl) / sizeof(tbl[0])
is the most typical way to do this.
Please note that using int for array sizes is not the best idea.
int