I know this is a very basic question in C, so I apologize beforehand if this is naive: I'm just learning the basics a few days in.
int main() {
// initialize the variables
int num_whitespaces, num_other;
int num_digits[10];
printf("%lu", sizeof(num_digits));
}
This prints 40
, which seems odd to me. Why wouldn't this print 10
, which would be the length of the array in javascript or so.