title: Cannot convert a::c * to c * in pointer to structure
body: <p>This is the summary:</p>
  
  <pre><code>struct a
  {
      struct b{
      } x;
  
      struct c{
      } y;
  
  };
  
  main(){
      struct a z;
      fun(&amp;z.y)
  }
  fun(struct c *p){
  }
  </code></pre>
  
  <p>getting error in type conversion from a::c * to c * while passing parameters in the function.</p>
  
  <p>My question is whether or not a beginner can participate in stackoverflow, because it seems that my question get more likely to get negative scores.</p>
  
  <p>Original program is:</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;conio.h&gt;
  
  void fun(struct c *p);
  struct a
  {
      struct b
      {
          int i;
          float f;
          char ch;
      } x;
  
  
      struct c
      {
          int j;
          float g;
          char ch;
      } y;
  };
  
  void main()
  {
      int *p;
      struct a z;
      clrscr();
      fun(&amp;z.y);
      printf("\n%d %f %c",z.x.i,z.x.f,z.x.ch) ;
      getch();
  }
  void fun(struct c *p)
  {
      int offset;
      struct b *address;
      offset= (char *) &amp;((struct c *)(&amp; ((struct a*)0)-&gt;y)-&gt;j)-(char *)((struct a*)0);
      address =(struct b *)((char *)&amp; (p-&gt;j)-offset);
      address-&gt;i=400;
      address-&gt;f=3,14;
      address-&gt;char='s';     
  }
  </code></pre>
  
  <p>One more question how <code>0</code> is is typecasted in <code>((struct a *)0)</code>.</p>