So I'm using C for a few days and I didn't have this problem before but now I have a problem with C scanning different number than the one the user enter. I feel like it prints the location of the number but not the number itself. The number I get every time is 6422076 and if I print another number that I've scan from the user it just show the same number -4, 6422072 so I'm pretty sure It has to do with the location the computer storage the numbers.
I tried to print it with a few other ways and always get the same weird number.
void measures()
{
int height;
printf("\nEnter your height:\n");
scanf("%d",&height);
while(height<140 || height>210){
printf("Invalid input, try again: \n");
scanf("%d",&height);
}
printf("height: %d\n",&height);
}
not getting any errors