cw02 - Functions 3

Make sure that you follow all the coding standards
From Linux on the GL machine:


Do the following:

  • Copy your celsius.c code from the cw1 directory to your cw2 directory
  • Rename the source file to functions3.c
  • Modify the code to do the following:
    • Instead of passing back a float from the conversion function, pass a variable in by reference that will be assigned the converted value
      • Make sure you have a float variable for the converted value defined in main()
      • Pass the address of that variable to the function
      • Modify the function definition and prototype to accept the new reference parameter
      • Assign the converted value to the reference parameter in the function
  • From main(), display the converted value.