Pointer to class, implementing multiple interfaces
<pre><code>class I1 {};
class I2 {};
class C : public I1, public I2 {};
C c;
I1 *i = static_cast&lt;I1*&gt;(&amp;c);
C *p = static_cast&lt;C*&gt;(i);
</code></pre>

<p>I am trying to understand if casting between object pointer and interface pointer is safe. </p>

<ul>
<li><p>Is the above code wrong? Are there problems with object slicing and why?</p></li>
<li><p>Is <code>static_cast</code> the appropriate cast here? </p></li>
<li><p>Are the binary representations of <code>i</code> and <code>p</code> the same?</p></li>
</ul>