Floating-point numbers are used to represent real numbers that contain both integer and fractional parts. In this article, we will learn how to find the product of two floating-point numbers in C.
- Floating-point numbers can store decimal values such as 2.5 and 3.14.
- The multiplication of two floating-point numbers is performed using the * operator.

Multiplies two floating numbers using the multiplication operator ( * ).
#include <stdio.h>
// Function to multiply floating point
// numbers
float multiply(float a, float b)
{
return a * b;
}
// Driver code
int main()
{
float A = 2.12, B = 3.88, product;
// Calling product function
product = multiply(A, B);
// Displaying result up to 3 decimal places.
printf("Product of entered numbers is:%.3f", product);
return 0;
}
Output
Product of entered numbers is:8.226