I am currently trying to learn C and have stumbled accross the following problem:
The above code is really simple but it does not produce the desired result, the printf command returns 7 no matter what i enter. Have I made a mistake?Code:double y = 7; scanf("%f",&y); printf("%f",y);
The code works fine when i change the double to a float.
Thanks for your help!!