How to get number of elements in array of pointers?
Below is my code:
struct mystruct
{
int a;
char ch[10];
int c;
};
mystruct *m_arr[2];
I am traversing this array in some other files. Instead of hard-coding as 2 in every file I want to get the number of elements in the array programmatically.