Hi I've just started learning C using K&R, and for exercise 1-15 I have to rewrite a program, using my own function. I've written the program the function and the test for it, it compiles fine using gcc, but when I run it all I get is 'Segmentation fault'.
I've tried to figure this out, but don't really have a clue as I have just started, but here is the code I have written if this explains anything :P
/* convert to Fahrenheit from Celsius function */
/* cfconvert function */
float cfconvert(float celsius)
fahr = (celsius * 1.8) + 32.0;
/* test conversion function */
float c, f;
printf("Enter 'float' temperature in Celsius to convert: ");
f = cfconvert(c);
printf("\nCelsius: %f.1\tFahrenheit: %f.1\n", c, f);
Thanks for your help in advance. Roastie.