@ankit: does that mean that after the compiler is informed that the void pointer will point to integer witht he typecast statement and then we point it to some other type , it will be an error? i mean after that typecast statement, if i do char a; k=&a; is it wrng?
On Tue, Aug 9, 2011 at 2:06 PM, ankit sambyal <ankitsamb...@gmail.com>wrote: > The typecasting tells the compiler that the void pointer is now pointing to > an integer and when we use this pointer to access the integer it takes value > from 4 bytes. But when we try to increment that pointer, it will point to > the next byte. Try taking k as pointer to double instead of void, u will c > the same result. > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- "People often say that motivation doesn't last. Well, neither does bathing - that's why we recommend it daily." -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.