Question: In `C`, **array elements are treated as pointers**. So the expression `sizeof(arr)/sizeof(arr[0])` becomes `sizeof(int *)/sizeof(int)` which results in `1` then why the following program give output is `12 11`. 

```
#include <stdio.h>

    int main()
    {
            int n1, n2;
            char arr1[] = "Hello World";
            char arr2[] = {'H','e','l','l','o',' ','W','o','r','l','d'};
            n1 = sizeof(arr1)/sizeof(arr1[0]);
            n2 = sizeof(arr2)/sizeof(arr2[0]);
            printf("n1 = %d\nn2 = %d\n", n1, n2);
            return 0;
    }

```

Answer: 
> 
> array elements are treated as pointers
> 
> 
> 

It is not a true. Arrays are **NOT** pointers. But they decay to pointers to first element when are passed to functions. And `sizeof(array)` is the number of bytes that whole array occupies.
To make the [Serhio's answer](https://stackoverflow.com/a/39490757/4833281) clearer it's important to note `sizeof()` is an operator and not a function as said before by Grzegorz on his comment. It means its evaluantion is made in compile-time, but what does it means?

Once `arr1` or `arr2` are declared in that way the compiler knows its size before execution starts and than `sizeof(arr1)` will be converted to `sizeof(char[12])` (it includes `\0` char at the end) and `sizeof(arr2)` to `sizeof(char[11])`, which results in 12 and 11.

As it's made in compile-time the compiler knows they must be handled as arrays and not pointers by the `sizeof()` operator, what is completely different to **dynamically allocated arrays**, which are allocated in execution-time and `sizeof()` will operates over a normal char pointer size (architecture dependent: it may be 4 bytes on 32bits systems or 8 bytes on 64bits).