how to find out size of array in c code example
Example 1: size of an array c
int a[20];
int length;
length = sizeof(a) / sizeof(int);
Example 2: size of an array in c
size_t n = sizeof myArray / sizeof *myArray;
int a[20];
int length;
length = sizeof(a) / sizeof(int);
size_t n = sizeof myArray / sizeof *myArray;