CAN WE TYPE CAST AN INTEGER AS (VOID *)X..(Like can I return a value (void *)x)



now suppose I have declared an integer value inside a function as
int x;
now if the return type of the function is of type (void *) then can I
write
return((void *)x) in side the function?
I came across this in a document on multithreading in C..I can post the
exact portion of code which works correctly with such an assignment if
you people want.
Please clarify my doubt.I hope I have conveyed it properly.

.



Relevant Pages

  • Re: [RFC][PATCH 0/8] Critical Page Pool
    ... >The following patch series implements such a critical page pool. ... int get_dap_lock ... void *debug_kmalloc ... bestprev = prev; ...
    (Linux-Kernel)
  • Re: char** function parameters
    ... > void f ... > int main ... Try the trick above, see if it helps. ... Prev by Date: ...
    (comp.lang.c)
  • Re: what wrong ??
    ... > int a; ... > void main ... > violation?? ... Prev by Date: ...
    (microsoft.public.vc.debugger)
  • Re: How NOT to code
    ... > Tell that to the guys running x86-64 systems, where int is 32 bits but ... > void * is 64 bits. ... Prev by Date: ...
    (rec.games.roguelike.development)
  • Help in Java swings(internal Frame)
    ... public int getSize() ... public void valueChanged{ ... private JScrollPane scrollPane1; ... public class PeakContainer extends JInternalFrame ...
    (comp.lang.java.programmer)