why does this fail
<p>i am stuck and unable to figure out why this is the following piece of code is not running .I am fairly new to c/c++.</p>

<pre><code>#include &lt;iostream&gt;
int main(){
char *arr="Hello";
char * arr1="World";

char **arr2=NULL;
arr2[0]=arr;
arr2[1]=arr1;

for (int i=0;i&lt;=1;i++){
    std::cout&lt;&lt;arr2[i]&lt;&lt;std::endl;
}
return 0;
}
</code></pre>

<p>where as this is running perfectly fine</p>

<pre><code>#include &lt;iostream&gt;
int main(){

char *arr="Hello";
char * arr1="World";

char *arr2[1];
arr2[0]=arr;
arr2[1]=arr1;

for (int i=0;i&lt;=1;i++){
    std::cout&lt;&lt;arr2[i]&lt;&lt;std::endl;
}
return 0;
} 
</code></pre>

<p>Why is this? and generally how to iterate over a char **?
Thank You</p>
