declare array size with variable c code example Example: size of an array in c size_t n = sizeof myArray / sizeof *myArray;