daniel
daniel

Reputation: 587

How to determine the length of an array of strings in C

I have a function which splits a string into tokens and stores it in an array. How to determine the size of an array of strings of type char**?

ie: char **input;

Upvotes: 0

Views: 112

Answers (1)

sreepurna
sreepurna

Reputation: 1662

Keep a variable globally and increment that variable value in the function which is splitting the string into tokens & storing into array.

Upvotes: 2

Related Questions