In the example above, the int array size is evaluated before local x variable declaration is completed, hence, at the moment of x[] initialization, the global x is not hidden by the local one.
Accordingly, sizeof(x) / sizeof(int) evaluates to 5 * sizeof(int) / sizeof(int), hence the result is 5.
Ввійдіть щоб вподобати
Ввійдіть щоб прокоментувати