There are many drawbacks to using void * in C (memory related, type related, efficiency wise …). In spite of them we use them a lot for the flexibility they provide.
List the disadvantages/drawbacks using void * (and preferred solution in C – if possible).
EDIT: please go through the follwoing link: http://attractivechaos.wordpress.com/2008/10/02/using-void-in-generic-c-programming-may-be-inefficient/
There are no efficiency issues with void pointers. The only limitations with void pointers are:
sizeof(void)is illegalHowever GCC assumes that
sizeof(void)is 1 and allows pointer arithmetics on void pointers – see here