<p>Why does <code>n</code> not equal to <code>8</code> in the following function?</p>

<pre><code>void foo(char cvalue[8])
{
  int n = sizeof (cvalue);
}
</code></pre>

<p>But <code>n</code> <em>does</em> equal to <code>8</code> in this version of the function:</p>

<pre><code>void bar()
{
  char cvalue[8];
  int n = sizeof (cvalue);
}
</code></pre>

Because you can't pass entire arrays as function parameters in C.  You're actually passing a pointer to it; the brackets are syntactic sugar.  There are no guarantees the array you're pointing to has size 8, since you could pass this function any character pointer you want.
```
```
// These all do the same thing
void foo(char cvalue[8])
void foo(char cvalue[])
void foo(char *cvalue)
```
```