I'm writting a progrm in which I want to verify the user doesn't input incoherent data. When I code this:
Code:
#include<stdio.h>;
#include<conio.h>;
main(){
float var1;
clrscr();
scanf("%f",&var1);
printf("\n\n%f",var1);
}
What happens is, if the user enters a valid float value I get the same float value on the output (duh). If he enters a character or a string I always get the same output whatever the input, that is: 149709439917360000.0000 . My question is, how does the computer get this value? Does it convert the characters into ASCII and multiply them or what? Thank you...