Question: I am using the Laravel 5.6 Storage API to store my files in `public/storage/images`. This works fine. When I want to retrieve a full URL for one of these files, I use

```
$path = Storage::disk('public')->url('images/' . $url);

```

This returns

> 
> <http://localhost:1234/public/storage/images/foobar.jpg>
> 
> 
> 

But since my server is set up to ignore `public`, this address does not return the image. Instead, this address:

> 
> <http://localhost:1234/storage/images/foobar.jpg>
> 
> 
> 

returns the image. Is there any way to produce this address using Laravel's API, rather than doing an ugly find & replace?

Answer: 
`arr[]`, as a function parameter, is a pointer. `sizeof(arr)/sizeof(arr[0]);` is the size of a pointer/size of of an `int`. No arrays involved. 

> 
> Is Variable size in C compiler dependent?
> 
> 
> 

Yes, an `int` could be 32-bit, 16-bit, etc.1 (Must be at least 16)

An object pointer could be 16-bit, 32-bit, 64-bit, or etc.1 (Must be at least 16)

A pointer is often wider than an `int`, yet could be the same or (rarely) less. The ratio could be 2/1 or 1/1 or others.

---

1 Other sizes are possible and have been employed such as 36-bit `int` or 48-bit object pointer. This is C's ability to adopt to just about any processor ever built and likely to all new ones. The flexibility comes at the expense that *portable* code must account for these variations.
`Are the variable sizes compiler dependent ?` Yes it depends on the compiler but that doesn't mean architecture point of view is irrelevant . Also it depends on architecture whether it's `16/32/64` bit system for e.g, in `16-bit` machines, `sizeof (int)` is `2` bytes, in `32-bit` machines it's of `4` bytes.

It has been considered `int` was the native size of a processor, i.e., the size of register. 

Here in function argument `arr[]` is a pointer not an array.

So if system is `32` bit system then 

`sizeof(arr)/sizeof(arr[0]);`

Will result in `1` as `4/4 = 1`.

I find @Eric comments very true & interesting about compiler and architecture role in defining variable size.

> 
> The sizes of types are ultimately determined by the C implementation
>  (notably the compiler), not the architecture or the operating system.
>  While C implementations are usually heavily influenced by the
>  architecture, computers are effectively Universal Turing Machines, so
>  that any desired choices for sizes can be implemented. C
>  implementations sometimes choose sizes based on considerations of what
>  source code is to be supported rather than what is most efficient for
>  the architecture. They may even support a choice of sizes via
>  command-line switches.
> 
> 
>