Why is length of array still same after realloc? : <p>This is part of my code :</p>

<pre><code>array = (int *) malloc(5*sizeof(int)); 
</code></pre>

<p>it is initialised and has some values, I am skipping this step here for more clearance.</p>

<pre><code>memmove(array, array + 1, 4*sizeof(int));
array = realloc(array, 4*sizeof(int));
</code></pre>

<p>What i wanted to accomplish here is to remove first member of array and to move whole array one step to the left. Still when I try to check length of array using :</p>

<pre><code>strlen(array);
</code></pre>

<p>I get value 5. It seems like realloc doesn't work properly, because when I also try to print fifth element of an array, which should be after realloc out of arrays range, it prints value which i previously gave to it. How is it possible? </p>

<p>Can somebody point me out where am I making mistake and what am I missing?  </p>
