//get a float from user
//print float value to console
#include <stdio.h>
int main()
{
//define a float variable
float a;
//print the prompt
printf("Please enter a float number: ");
//Actually getting the number
scanf("%f", &a);
printf("You have entered %f", a);
}
float: It is used to store decimal numbers (numbers with floating point value) with single precision. double: It is used to store decimal numbers (numbers with floating point value) with double precision.
// To get size in bytes of float variable in C initialize one of same type
float var_float = 1;
size = sizeof(var_float) //Get size of variable float in given machine