+ 1

Help with type-casting & dereferencing of void pointers (C)

Could anyone please explain why this code ( for finding the square of a number) needs type-casting & dereferencing :- https://code.sololearn.com/cSWEUTgA4iTF/?ref=app But this one doesn't (also for finding the square of a number) :- https://code.sololearn.com/cSfsRkPR8EdL/?ref=app Also, do we have to follow the procedure that we used with float for other data types too(long, double, etc.)? Or is the procedure exclusive for float data type?

10th Dec 2018, 9:14 AM
Dikshant Chaubey
Dikshant Chaubey - avatar
1 Answer
+ 2
Can you change your question into C?
10th Dec 2018, 9:24 AM