title: Returning a value from a void function
body: <p>I got an idea, that void function does not mean "do not return anything" but return something has unknown type, like <code>void *</code> which is pointer that you can use it with any type of data. So I wrote the following code to be sure :</p>
  
  <pre><code>#include &lt;stdlib.h&gt;
  #include&lt;stdio.h&gt;
  void x_function(void *);
  void x_function(void *d)
  {
      printf("the integer value of d is %d \n " , *(int *)d );
      printf("the string  value of d is %s \n " , (char *)d );
      printf("the character value of d is %c \n " , *(char *)d );
      printf("the double value of d is %lf \n " , *(double *)d );
      return 10;
  }
  
  int main()
  {
      int x = (int)x_function(520);
      printf("The Value is : %d" , x);
      return 0;
  }
  </code></pre>
  
  <p>but the compiler gives an error: </p>
  
  <pre><code>error: invalid use of void expression
    int x = (int)x_function(520);
  </code></pre>
  
  <p>So is my idea wrong?<br>
  Is void function simply "Function that does not return anything "?</p>