understanding: converting from int address to char array
<p>What does this line do exactly? </p>

<p><code>(char*) (&amp;input)</code></p>

<p>I know that it converts the int(input) to char array..or am I wrong? and could you guide me how does it compute?</p>

<p>update:
I think I now understand a little, then I created c++ code from your comments</p>

<pre><code>#include &lt;cstdlib&gt;
#include &lt;iostream&gt;

using namespace std;
int main(){
 int input = 123456;
 int *p = &amp;input;

 char *cp = (char*)p; 

for(int counter = 0;counter &lt;sizeof(input); counter++){        
        cout &lt;&lt; *(cp+counter) &lt;&lt; endl;
        }


 system("pause");
 return 0;
}
</code></pre>

<p>but i think my code is wrong. because it only shows '@' , big 'r'? , and something like cross sign ...</p>
