address value of character pointers
<p>//if the code is  </p>

<pre><code>char str[]="hello";    
char *sptr=&amp;str[2];  
cout&lt;&lt;sptr;  
</code></pre>

<p>//the output is not a hexadecimal value but llo<br>
....why?<br>
//also consider the following code  </p>

<pre><code>char array[]="hello world";  
char array1[11];  
int i=0;  
while(array[i]!='\0')  
{array1[i]=array[i];  
 i++;}
</code></pre>

<p>//if we print array1,it  is printed as hello world, but it should have stopped when the space between hello and world is encountered. </p>
