isless() in C/C++

The function isless() is used to check that first argument is less than the second one. It is declared in “math.h” header file in C language. It returns true if successful otherwise it returns false.

Here is the syntax of isless() in C language,

bool isless(value1 , value2);


value1 − This is the first argument which will be checked with value2.

value2 − This is the second argument which is used to check value1 ans see that it is less or not.

Here is an example of isless() in C language,


 Live Demo


int main() {
   int val1 = 48;
   float val2 = 324.32;

   if(isless(val1, val2))
   printf("val1 is less than val2\n");
   printf("val1 is not less than val2");
   return 0;


Here is the output −

val1 is less than val2

Updated on: 25-Jun-2020


Kickstart Your Career

Get certified by completing the course

Get Started