Menu
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY CYBERSECURITY DATA SCIENCE
     ❯   

C float Keyword

❮ C Keywords


Example

Print a floating-point number:

float myNum = 5.75;
printf("%f", myNum);
Try it Yourself »

Definition and Usage

The float keyword is a data type which stores fractional numbers.

It is usually 32 bits (4 bytes) long, and it can store positive and negative numbers with values between 3.4e−038 and 3.4e+038.


Related Pages

Read more about data types in our C Data Types Tutorial.


❮ C Keywords