0
Why is this code working only integer type of numbers and no working with float type
If in this code change type float on int, the code is working, another compilation error https://code.sololearn.com/cCVT6trPn13X/?ref=app https://code.sololearn.com/cCVT6trPn13X/?ref=app
4 Answers
+ 1
the return value is void, which mean that you don't want the function to return any value, but in your code you have a return value, that will probably be an issue for your code
+ 1
You need to return the address of result, not result itself. Then you will need sq_int to be a float pointer. Then you will need to derefercence sq_int in the printf function call. Then it should work.
0
and how to be with the void pointer