C : Best way to alter pointers with functions
I am not sure what the best or recommended way of using functions to calculate and retrieve information is. Especially when you want to return more than one value at the same time(pointers). In the three given examples. I used, global variables | void functiontype with paramater pointer | int *functiontype with parameter pointer Using Global Variables: https://code.sololearn.com/c3UpKSIBAxPJ/?ref=app Using void functiontype with paramater pointer: https://code.sololearn.com/ctw1dnrsNkxi/?ref=app Using int *functiontype with parameter pointer: https://code.sololearn.com/cumXb2oCFF5p/?ref=app Explanation of the code: The programs work all the same. They input an fraction, shorten it and output it. The continue part with the while loop only works with the other compiler I am using outside sololearn. You could also do it with most of it in the main but the Prof. wants it to be split up as much as possible. I want to know which one of this is the best, worst and if there are better methods to do it.